![]() |
How to use an MS-DOS Command Prompt window |
|
|
Home > Tutorials > How to use an MS-DOS Command Prompt window |
||
The following tutorial is meant as a very brief introduction to the MS-DOS Command Prompt window. More detailed tutorials can be found online at other websites, such as ComputerHope.com
Some of our scripts (such as allposters.pl and gocollect.pl) can be run on your Windows PC. If you plan on doing that, then you must know how to use an MS-DOS Command Prompt window and you will need to install ActivePerl on your Windows PC. For our other scripts (such as Associate Engine ae.pl), you might need to use an MS-DOS Command Prompt window to edit or view some files.
Let's open an MS-DOS Command Prompt window. To do that, click on the "Start" menu (at the lower left of your screen) and select "Run...".
If you are using Windows XP, then type "cmd" (no quotation marks) into the box and click "OK"; otherwise, type "command" (no quotation marks) into the box and click "OK".

You should see an MS-DOS Command Prompt window appear.


You tell the MS-DOS Command Prompt window what you want to do by typing commands rather than using your mouse. The MS-DOS Command Prompt window understands the commands described in the table below (there are more commands than those
listed below). At the end of each command, press the Enter key. To get help on a particular command, add
|
Command |
Meaning |
|
cls |
Clears the MS-DOS Command Prompt window and moves the command prompt to the top of the window (no files are changed -- the window display is merely cleared). |
|
|
MS-DOS works on one directory at a time. The "current" directory is indicated as part of the command prompt. For example, "C:\WINDOWS\Desktop>" means that the current directory is the "Desktop" directory which is located inside the "WINDOWS" directory. Use the "cd" command to make a different directory the "current" directory ("cd" is short for "change directory"). For example, "cd \perl" will make "\perl" the current directory. To get to the "root" of your c: drive, type "cd \". |
|
dir |
"dir" lists the contents of the current directory. "dir DIRNAME" lists the contents of the DIRNAME directory,
e.g.: |
|
|
Starts the Notepad text editor program and opens the file named FILENAME. If the file does not exist, Notepad will ask you if you want to create
a new file with that name. For example, |
|
|
Displays on the screen the contents of the file named FILENAME. For example, |
|
|
Displays on the screen the contents of the file named FILENAME. For example, |
|
|
The command "start ." (the . period is required, and there must be a space before it) causes the current directory to be shown in a Windows folder window. |
|
|
Copy the file that has name NAME1 to NAME2. The file NAME1 is unchanged. If a file with the name NAME2
already exists, you will be asked if you want to overwrite the current NAME2 file. For example, |
|
|
Rename the file that has name NAME1 to NAME2. If NAME2 already exists, then an error message is shown instead. For example, |
|
|
Delete file that has the name FILENAME. The file FILENAME is immediately deleted without any confirmation.
|
|
|
Make a new directory named DIRNAME inside the current directory. If you want to make the new directory inside a directory other than the current directory, then use the "cd" command first. For example, "md allposters" makes a new directory called "allposters" inside the current directory. |
|
exit |
Closes the |
E.&O.E.
© 2003-2008 Cusimano.Com Corporation
http://www.c3scripts.com/tutorials/msdos/