This is a short summary of MSDOS. It contains only a few of the most useful commands and only shows some of the variations on each. For more detail check the manual or one of the many books or reference Web sites on MSDOS.
Drive Identifiers and File Names
A file name can have three parts, a drive identifier, a name, and an extension, but the drive identifier and extension are optional. The name must be from 1 to 8 characters, and the extension, if any, from 1 to 3 characters. A drive identifier is a letter with a colon, like A: B: C: or M:. There should be no spaces anywhere in the file name. Here are a few examples:
HOHO A:HOHO A:HOHO.EXECommand Summaries
These are the commands you will need to know. In the general forms, the square brackets mean that something is optional.
DIR: Display the directory of files on a disk
general form: DIR [ <drive> ] [/W] DIR displays the directory of the default drive DIR B: displays the directory of drive B DIR A: displays the directory of drive A DIR /W displays the directory in "wide" formatTYPE: Display the contents of a disk file
general form: TYPE <file name> TYPE HOHO display the file called HOHO on the default drive TYPE B:HOHO display the file called HOHO on drive BPRINT: Print the contents of a disk file
general form: PRINT <file name> PRINT HOHO print the file called HOHO on the default drive PRINT B:HOHO print the file called HOHO on drive BERASE (or DEL): Erase a file from a disk
general form: ERASE <file name> ERASE HOHO erase the file called HOHO from the default drive ERASE B:HOHO erase the file called HOHO from drive BRENAME: Change the name of a file
general form: RENAME <file name> <file name> RENAME HOHO HAHA change the name of the file called HOHO on the default drive to HAHA RENAME B:HOHO HAHA change the name of the file called HOHO on drive B to HAHA<program name>: Load and execute the program
HOHO load and execute the program called HOHO which is on the default drive B:HOHO load and execute the program called HOHO which is on drive BFORMAT: Make a disk ready to use
general form: FORMAT <drive> [/S] FORMAT B: initialize the new disk that is in drive B FORMAT B:/S initialize the new disk that is in drive B and put a copy of the operating system on itCOPY: Make a copy of a file
general form: COPY <file name> <file name> or COPY <file name>MKDIR: Create a sub-directory of the current directoryCOPY A:HOHO B:HOHO copy the file called HOHO on drive A to drive B, and call the new file HOHO COPY A:HOHO B: copy the file called HOHO on drive A to drive B, and call the new file HOHO COPY A:HOHO B:HAHA copy the file called HOHO on drive A to drive B, and call the new file HAHA COPY HOHO B: copy the file called HOHO on the default drive to drive B, and call the new file HOHO
general form: MKDIRRMDIR: Remove a sub-directory of the current directoryMKDIR HAHA create a directory called HAHA
general form: RMDIRCD: Change to a new directoryRMDIR HAHA remove the directory called HAHA
general form: CDCD HAHA change to the directory called HAHA
Wild cards and path names
You can refer to a group of files using "wild cards." For example:
DIR *.EXEwill show the names of all files with the extension EXE regardless of the file name:
DIR *.*will show the names of all files.
You can also refer to a file in a different directory by specifying the path to it. For example:
C:\HAHA\HOHO BOBrefers to a file called BOB which is in the directory called HOHO which is a subdirectory of HAHA on drive C.
There are many other MSDOS commands, and, as with any command line interface, there is online reference material. To see a list of commands, type:
HELP
For help with an individual command, type:
HELP <command name>