I. THE BASICS OF MS-DOS
Navigating folders and Simple CommandsDepending on whether you are using the Prompt or "true DOS", you should see a prompt similar to this:
C:\>or this:
C:\Documents and Settings\Yourname>Regardless, you are ready to get started.
Seeing what is in your current directoryObviously, you have to be able to see what you're doing or else you are "shooting in the dark" with no idea what to do. Luckily, there is a command to show what is in your current directory. Type DIR and press [Enter] to activate this fuction. It should look like this:
C:\>DIRThe results I got in C:\ were:
Volume in drive C has no label.
Volume Serial Number is 8C87-FFA1
Directory of C:\
04/18/2006 12:06 AM 0 AUTOEXEC.BAT
04/21/2006 04:42 PM <DIR> Batch
04/18/2006 12:06 AM 0 CONFIG.SYS
04/18/2006 12:21 AM 32 csb.log
04/21/2006 07:45 PM 0 dir.txt
04/18/2006 12:12 AM <DIR> Documents and Settings
04/18/2006 12:45 AM <DIR> NVIDIA
04/21/2006 04:27 PM <DIR> Program Files
04/20/2006 08:01 PM <DIR> WINDOWS
4 File(s) 32 bytes
5 Dir(s) 196,047,323,136 bytes free
The items with <DIR> are directories, or folders. Anything else is a file. The column on the left is the date the files were last changed, the next column shows the time the files were modified. The number to the left of the file name is the size of the file in bytes.
If there are too many directories to list on one screen, type one of the following commands:
DIR /wOR
DIR /pThe /w switch makes the DIR appear in a wider format, while /p displays the DIR one screenful at a time.
Changing directoriesOK, you want to leave the directory you're in. No matter how exciting it gets, C:\ isn't going to be exciting enough as there is not all the information you need in the root. To change directories, type CHDIR [directory name]
or CD [directory name], replacing [directoryname] with the name of the directory you wish to go to. So, on my pc, if I want to change to C:\NVIDIA, I type
C:\>CD NVIDIAThe prompt changes to
C:\NVIDIA>Opening filesIn the Command Prompt, these files will run outside of cmd.exe. In true DOS, this is obviously not the case, but only DOS-friendly files may be run. To open an EXE file, simply type the name of the EXE file, and it will run. So, If I'm in C:\Program Files\Chami\HTML-Kit\ and I want to run HTML-Kit from Command prompt, I would type
C:\Program Files\Chami\HTML-Kit>HTML-Kit.EXEand the program would run. To access a text file, you would use the TYPE command:
C:\>TYPE dir.txtand the information would display on my command screen. Note, however, that some text files may be too long for the screen. For files like this, type the following command:
C:\>TYPE dir.txt | moreReplacing dir.txt with the name of the file you want to display. The | key is found above the [Enter] key ([Shift] and \). When the file reaches the size of the page, it will pause, asking you to press [Enter]. Pressing [Enter] will move the page down one line. If you change your mind partway through reading the long file, Press [Ctrl] and C. You will go back to the prompt.
The TYPE command works with virtually any kind of file, but note that you will not be able to read all of them. Compiled EXE files will show strange characters, as will .dat and other files. Do not worry, no harm is done.
Clearing the screenIf you don't like clutter, press CLS at any time. This command clears the screen of everything but the latest prompt.