command-line

Querying PDF's using command line?

Recently I came across command line to find damaged JPEG here at http://www.commandlinefu.com/commands/view/2352/find-corrupted-jpeg-image-files. If there are some commands related to PDF I will be happy? often I play with PDF for many reasons. Finding number of words? Finding Number of Lines? Finding Number of Pages? Is is possible? ...

Comparing files on the unix command line..

Suppose I have two files, A and B, and that lengthOf(A) < lengthOf(B). Is there a unix utility to tell if file B duplicates file A for the first lengthOf(A) bytes? If I do "diff A B", the output will be all the 'extra stuff' in the B file, which misses the point; I don't care what else might be in file B. If I do "comm A B", then I hav...

How do I detect combination argument errors using Getopt::Euclid?

I'm being forced (by engineering policy) to use Getopt::Euclid to parse arguments to my Perl program. I have three arguments, foo, bar and blah. It is legitimate to have none of these and use other arguments instead. If foo is present than exactly one of bar or blah should be present, and if either bar or blah are present, than foo mu...

Interfacing MFC and Command Line

I'd like to add a command line interface to my MFC application so that I could provide command line parameters. These parameters would configure how the application started. However, I can't figure out how to interface these two. How could I go about doing this, if it's even possible? ...

Why are *nix commands referred to as Man(1), Diff(1), Cat(1), etc...

Possible Duplicate: Why do programs in Unix-like environments have numbers after their name? What does the (1) mean? ...

Javac cannot find jar for apache commons config

I'm trying to compile a very simple program in Java 1.6 on Ubuntu Jaunty, using Apache Commons Config jar. I keep getting the "package org.apache.commons.configuration does not exist" error, even though the jar is in the same directory. Any ideas? Directory Listing ~/source/UpdateStockHistory$ ll total 304 -rw-r--r-- 1 crosse cros...

How to change user credentials of windows service from command line?

How to change user credentials of windows service from command line? ...

Using a jar in a Java project?

Hi All, I'm trying to use the public methods/classed from a project provided as a jar file (called Hello.jar for instance) wrapped in a package called hello. package hello; public class Hello { public static void main(String[] args) { coucou(); } public static void coucou() { System.out.println("Hello there"); } } In...

How to run regasm.exe from command line other than Visual Studio command prompt?

Hi I want to run regasm.exe from cmd. which is avalable in c:\windows\Microsoft.net\framework\2.057 I do like this c:\ regasm.exe It gives regasm is not recognized as internal or external command. So I understood that I need to set the path for regasm.exe in environment variable. For which variable do I need to set the path to run r...

run php script from command line with variable

I want to run a php script from the command line, but I also want to set a variable for that script ie. Browser version: script.php?var=3 Command line: php -f script.php (but how do I give it the variable?) PS. doesn't matter if it's a GET variable or not, I just used that as an example. ...

Outlook not processing multi-byte characters when using mailto:

I have similar problem to the one described in this question: I am using the "mailto" protocol to open the default mail client from Java (I am tied to Java 5 for now, so sadly I can't use the Desktop API). Some of the emails contain Japanese text. The strings are already being UTF-8 encoded as follows: private void email(String to, Str...

Is there a parameter for MSDOS commands (e.g. ipconfig) that cause them to wait for input before disappearing?

When I run e.g. ipconfig using the Run command (windows key+R), once the program has executed it immediately closes the instance of the command line interface, is there any universal parameter I can add to: ipconfig nslookup dir etc... to ensure that the results stay printed in the console window? ...

Converting argv back to a single string

I'm writing a (Win32 Console) program that wraps another process; it takes parameters as in the following example: runas.exe user notepad foo.txt That is: runas parses user and then will run notepad, passing the remaining parameters. My problem is that argv is broken down into individual parameters, but CreateProcessAsUser requires a...

How to SET a variable to the path of parent directory on windows?

Hello, Struggling with command line again, I have figure out that I can store the current working directory in a variable like so: SET current=%cd% How would I set parent though? SET parent=%..% does not work, as it echoes %..% Basically, calling a batch script C:\a\b\myscript.bat with the following contents: @echo off set current=...

Is there a tool to search inside both unicode and ANSI text files from the command line?

I have tried to use findstr and even windows explorer but I can't get it to find text inside of unicode files. Any suggestions? ...

Number of tokens limit in a FOR command in a Windows batch script

Hello, I was trying to process a text file in a Windows batch script and I ran into something that looks like a limitation to 31 tokens in a FOR loop. I isolated the issue in the code below: @ECHO OFF SET DATA=01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 FOR /F "tokens=31* de...

Windows Command Line Script to rename a folder to current month -3 (e.g. 2009-04 to 2009-01)

What would the Windows command line script be to rename a folder from the current month, to the current month - 3, using the format YYYY-MM ? e.g.: c:\myfiles\myFolder\ should become: c:\myfiles\2009-01\ ...

windows command line and Python

I have a python script that i want to run from the command line but unsure how to run it. Thanks :) ...

Operate SVN on a server remotely using a GUI

I am using WebDAV to update files on a remote testing server and I need to commit them once I am complete. The problem is that using TortoiseSVN on the WebDAV instance is very slow since it has to sync all the lock and entries files on the commit. I can use the command line on the server, but I prefer the tools TortoiseSVN provides. I...

Trying to Build and Publish Asp.net website from command line using aspnet_compiler

I am trying this. I have built asp.net website. When I publish to IIS through VS2008 it works fine. Lets say my site is at c:\projects\Website1\ I want to publish it to c:\Inetpub\wwwroot\WebsiteOne I am trying to mimic publish from studio. That is publish and remove anything that is in side. I tried this: aspnet_compiler -v/WebsiteOne...