command line arguements

Status
Not open for further replies.

joshd

Fully Optimized
Messages
2,133
i know you can add parameters to a command line to make various programs run in different ways/setting, but how do you actually make this work? i ve tried using cammand prompt and stuff, but nothing will actually open the program, it just says its not found, ot something like that
 
you will need to be in the directory for the application, and the application itself will have to support the switches. Once you are in the directory you can type the program name and then /? to see a list of the switches associated with that program.
 
what do you mean? im afrain ur going to have to explain more simply...
 
Like so:

When you go to a program using the GUI (that is, by clicking on folders until you find it) the folder it's in should have a text box at in a bar at the top labelled "address". The contents of this text box start "C:\" or some other letter of the alphabet. This is the directory the program is in.

If you start the program by clicking on a shortcut on the desktop, right click the shortcut and select "properties". There should be a text box labelled "target". The contents of this text box is the directory.

Sometimes there's no such textbox. In that case the directory is almost certainly "C:\documents and setting\your account name\desktop"

Once you know the directory (called the path) you can use it in one of two ways:

Type cd "path" (use the quotes) in the command prompt. The prompt will change to the path. This means that you are working "in" that directory. Any files or programs will be assumed to be in that directory unless you specify otherwise.

Alternatively, you can type whenever you mention the program "path\program name". (Aain use the quotes).

Nothe that you can't be in two paths at once. So if you a program that's in one folder with a file that's in another, you'll have the path for at least one.

Hope this is clear enough.
 
nah i still cant get it to work. am i meant to type "path" into the command prompt? it doesnt work!:mad:
 
Like this...first, all quotes are for reference, not for use in the actual execution.
take the program c:\winnt\system32\telnet.exe
from the command line, which you get to by going to start, then clicking on run, and typing the following(for win2k and XP): "cmd.exe" no quotes.
from here, you will type, "cd\" no quotes. This will get you to the base directory. then you type: "cd winnt\system32"
Then type "telnet.exe /?" This will show you the command line options available to you.
something like this:
telnet [-a][-e escape char][-f log file][-l user][-t term][host [port]]
-a Attempt automatic logon. Same as -l option except uses
the currently logged on user's name.
-e Escape character to enter telnet client prompt.
-f File name for client side logging
-l Specifies the user name to log in with on the remote system.
Requires that the remote system support the TELNET ENVIRON option.
-t Specifies terminal type.
Supported term types are vt100, vt52, ansi and vtnt only.
host Specifies the hostname or IP address of the remote computer
to connect to.
port Specifies a port number or service name.

Hope that helps you understand it a little better.
 
Status
Not open for further replies.
Back
Top Bottom