Last reviewed 16 Sept 2026 · 9 min read
MS-DOS
MS-DOS (Microsoft Disk Operating System) — a single-user, single-tasking, command-line (CLI) operating system released by Microsoft in 1981 for the IBM PC. Modern Windows provides a Command Prompt (cmd.exe) with many similar commands.
Prompt, drives and paths
- Prompt shows the current drive and directory, e.g.
C:\>orC:\PROJECTS>. - Drives —
A:/B:(historically floppy),C:(usually hard disk),D:onward (other drives). - Root directory
\; subdirectories (folders). - Path — location of a file, e.g.
C:\PROJECTS\BRIDGE\DESIGN.TXT. .= current directory;..= parent directory.
File names (classic DOS 8.3 convention)
- Primary name up to 8 characters + extension up to 3 characters (e.g.
REPORT.TXT). - Not case-sensitive; certain characters not allowed (e.g.
\ / : * ? " < > |).
Wildcards
| Wildcard | Meaning | Example |
|---|---|---|
* |
Any number of characters | DEL *.BAK deletes all .BAK files |
? |
Exactly one character | DIR FILE?.TXT lists FILE1.TXT, FILEA.TXT |
DOS commands
Internal commands
Built into COMMAND.COM (loaded into memory at boot) — available without separate files.
| Command | Function | Example |
|---|---|---|
| DIR | Lists files and subdirectories | DIR /P (page-wise), DIR /W (wide) |
| CD / CHDIR | Change directory | CD PROJECTS, CD .., CD \ |
| MD / MKDIR | Make (create) directory | MD SITE2026 |
| RD / RMDIR | Remove (empty) directory | RD OLD |
| COPY | Copy files | COPY A.TXT B.TXT; COPY CON NOTE.TXT (create file from keyboard, end with Ctrl+Z) |
| DEL / ERASE | Delete files | DEL *.TMP |
| REN / RENAME | Rename files | REN OLD.TXT NEW.TXT |
| TYPE | Display contents of a text file | TYPE README.TXT |
| CLS | Clear screen | CLS |
| DATE / TIME | Display or set date/time | DATE |
| VER | Show DOS version | VER |
| VOL | Show volume label and serial number | VOL C: |
| PROMPT, PATH, SET | Customise prompt; set search path/environment variables | PATH C:\TOOLS |
| EXIT | Close command interpreter | EXIT |
External commands
Stored as separate executable files on disk (e.g. .COM/.EXE) — must be available in the path.
| Command | Function |
|---|---|
| FORMAT | Prepares a disk (creates file system) — erases data |
| CHKDSK | Checks disk for errors and shows status |
| XCOPY | Extended copy — copies directories and subdirectories |
| DISKCOPY | Copies entire floppy disk |
| TREE | Displays directory structure graphically |
| ATTRIB | Displays/changes file attributes (R read-only, H hidden, S system, A archive) |
| EDIT | Text editor |
| MORE | Displays output one screen at a time |
| SORT, FIND | Sort text; search for text in files |
| LABEL | Create/change volume label |
| SYS | Make a disk bootable (transfer system files) |
| DELTREE (later versions) | Delete a directory with all contents |
System and startup files
| File | Role |
|---|---|
| IO.SYS | Hidden system file — basic input/output interface with hardware |
| MSDOS.SYS | Hidden system file — DOS kernel |
| COMMAND.COM | Command interpreter — contains internal commands |
| CONFIG.SYS | Configuration settings (device drivers, memory) — processed at boot |
| AUTOEXEC.BAT | Batch file executed automatically at startup |
Batch files
- Text files with extension .BAT containing a sequence of commands executed one after another — automation (e.g. backups).
- Commands like
ECHO,PAUSE,REM(remarks),IF,GOTO.
Redirection and pipes
>redirect output to a file (overwrite),>>append,<input from file.|pipe output of one command to another:DIR | MORE.