Freedom Reborn Archive

Freedom Force Forums => Technical Issues => Topic started by: stumpy on February 14, 2007, 08:14:18 PM

Title: How to open a Windows command prompt (XP) and change folders in it
Post by: stumpy on February 14, 2007, 08:14:18 PM
This comes up once in a while, so I thought it may be worth describing briefly here.

Opening a Windows Command Prompt

There are (at least) three easy ways to open a Windows command prompt.


Changing Directories at the Command Prompt

Once the command prompt window is open, you often want to look at or run programs that are in a particular folder/directory. Unless you choose the third method of opening the prompt window mentioned above, this means you will have to use the cd command to change directories. For instance, if you are in the C:\temp folder and you want to get to C:\temp\spiff, you just enter cd spiff at the command prompt.

If you want to go up (or "out") one directory, enter cd .. (which would take you, for instance, from C:\temp\spiff to C:\temp). If you want to go all the way to the "top" or "root directory" of the current drive in one shot, enter cd \ at the prompt.

If the folder you want to change to has a space (or other odd character) in it, you can enclose it in quotation marks. For example, to change from C:\ to C:\Program Files, just enter cd "Program Files" at the command prompt.

If you want to go several directories deeper, you can cd to each, one after another,
C:\>cd "program files"

C:\Program Files>cd games

C:\Program Files\games>cd "Freedom Force vs The 3rd Reich"

C:\Program Files\games\Freedom Force vs The 3rd Reich>

or all at once
C:\>cd "Program Files\games\Freedom Force vs The 3rd Reich"

C:\Program Files\games\Freedom Force vs The 3rd Reich>


Setting the Size of the Command Window

The default commmand window is useful, but if you use it much, you will want to set it up so that you can see more of the information that would otherwise scroll off the screen.


Misc.

If you have the QuickEdit Mode and Insert Mode options checked (see above), you can select text in the command window by dragging over it with the left mouse button down. Then you can copy that selected text to the clipboard by clicking with the right mouse button.

Clicking in the command window with the right mouse button when no text is selected will paste text currently in the clipboard to the command prompt.

You will find it useful that the command line history remembers commands you have already entered and you can get to them using the up and down arrow keys. You can edit/change a line using the right and left arrow keys, as well as delete, backspace, etc.

Handy Hints

BTW, I recommend this link to a cheat sheet of commonly used command prompt commands: http://www.geocities.com/tlawlessrr/dos.htm
Title: Re: How to open a Windows command prompt (XP) and change folders in it
Post by: BentonGrey on February 14, 2007, 08:58:54 PM
Haha!  Thanks Stumpy, ignorant fellows like me will really appreciate this :D