This is by no means a complete description of these commands, nor is it a list of all MS-DOS commands. More detailed information can be found at http://www.computerhope.com/msdos.htm. See also the pages on batch files and DOS variables.


A drive is specified by a single letter followed by a colon. Usually, C: refers to the primary hard drive, A: is the "floppy" drive, and E: is the CD-ROM drive.

Each drive has a root directory, which might contain (sub)directories. Each directory consists of a list of filenames, or subdirectories, or both. Directory names follow the same conventions as filenames (see the next paragraph), separated by backslashes "\". For example, \ specifies the root directory of the current drive, C:\WINDOWS\SYSTEM is the WINDOWS\SYSTEM subdirectory of the root directory of drive C:, and DATA is the DATA subdirectory of the current directory.

A filename consists of up to eight letters or numbers (no spaces), optionally followed by a period and an extension with up to three characters. Any filename can be optionally preceded by a drive letter and/or a directory. Note: Some punctuation marks are allowed in file names, but others are not. If you must use something other than numbers or letters, other valid characters are:

( ) { } - _ ! @ # $ % ^ & ` '

A wildcard is a pattern that matches one or more filenames. A "?" will match any single character, while "*" matches any sequence of characters. For example, *.txt matches all files with the extension "txt", ab*.* matches all files whose names begin with "ab", and ab??.? matches all files whose name consists of "ab" followed by exactly two more letters and a one-letter extension.

Where filespec appears below, it can be replaced by either a filename or a wildcard.