Your first 10 DOS commands. (MS-DOS Featuring DOS 5.0 )
by David English
DOS can be a bit scary when you first see the C> prompt. And when you look in the DOS manual and find over 60 different DOS commands, it's enough to make you want to turn off your computer.
Not to worry. You can take care of nearly all your DOS needs with just ten commands and a dozen or so option switches. So stop complaining about how difficult DOS is--you're about to become an instant expert.
CD (Change Directory) Changes to specified directory. Use: CD drive/path Example: CD C:\DOS\UTIL
CHKDSK (Check Disk) Checks the status of a disk. Use: CHKDSK drive\filename Switches: /V (displays path and filename of each checked file and directory) /F (corrects allocation errors if found) Example: CHKDSK C:\/F
COPY Copies one or more files from one disk to another. If the path or filename is omitted for the target drive, COPY will default to the same path or filenmae that was designated on the source drive. If only the drive letter is specified on the target drive, COPY will default to the current directory.
To save time, you can use an asterisk (*) as a wildcard. C:\WORD\*.TXT includes all the files in the WORD directory with names that end in .TXT. C:\WORD\*.* includes all the files in the WORD directory. A:*.* includes all the files in the root directory of A: Use: COPY source target Switch: /V (verifies copy) Examples: COPY C:\WORD\MEMO.TXT A:\WORD\NOTES.DOC COPY C:\WORD\*.* A:\MEMOS\ COPY A:*.* B: COPY B:*.* A:/V
DIR (Directory) Displays a directory listing for one or more files. If a filename isn't specified, DIR will default to all files in the current directory. Like the COPY command, the DIR command accepts wildcards designated with an asterisk (*). Use: DIR filename Switches: /W (provides wide display) /P (pauses between screens) /S (includes subdirectories of current directory--DOS 5.0 only) /ON (sorts by name--DOS 5.0 only) /OD (sorts by date--DOS 5.0 only) /O-S (sorts by size, largest files first--DOS 5.0 only) Examples: DIR *.TXT DIR C:\DOS\*.* /W /P DIR /ON DIR C:\WORD\DOC\*.* /O-S
DISKCOPY Makes a copy of a disk. With DOS 4.0 and higher, DISKCOPY will automatically format your target disk, if necessary. Use: DISKCOPY source target Examples: DISKCOPY A: B: DISKCOPY B: A:
ERASE Erases one or more files. Like the COPY command, ERASE accepts wildcards designated with an asterisk (*). Use: ERASE filename Switch: /P (prompts before erasing) Examples: ERASE C:\WORD\MEMO.TXT ERASE *.* /P
FORMAT Prepares a disk for DOS. Use: FORMAT drive Switches: /S (creates a DOS system disk) /V:name (assigns a volume name to the disk) /B (reserves space for DOS system files) Example: FORMAT A: /V:MEMOS /S
MD (Make Directory) Creates a new subdirectory. If the backslash is omitted before the path, the subdirectory is placed in the current directory. Use: DM drive/path/name Examples: MD C:/WORD/MEMOS MD MEMOS
MEM (Memory) Displays the amount of memory installed and available for programs. This command is available only with DOS 4.0 and higher. Use: MEM Switch: /PROGRAM (includes each program's name, location, size and type) Example: MEM MEM/PROGRAM
RD (Remove Directory) Removes a subdirectory. This command can't remove the root directory, the current subdirectory, or any subdirectory with files in it. Use: RD drive/path/name Examples: RD C:/WORD/MEMOS RD MEMOS