A quick reference for the commands every DOS user should know.

File Management

DIR                     List files in current directory
DIR /W                  Wide format listing
DIR /P                  Pause after each screen
COPY file1 file2        Copy a file
MOVE file1 dir\         Move a file
DEL file                Delete a file
REN old new             Rename a file
TYPE file               Display file contents

Directory Navigation

CD \                    Go to root
CD ..                   Go up one level
CD dirname              Enter directory
MD dirname              Make directory
RD dirname              Remove directory
TREE                    Show directory tree

System Commands

CLS                     Clear screen
VER                     Show DOS version
MEM                     Show memory usage
CHKDSK                  Check disk
FORMAT A:               Format floppy
FDISK                   Partition hard drive

Batch File Example

Here’s a simple batch file that creates a menu:

@ECHO OFF
:MENU
CLS
ECHO =============================
ECHO        MAIN MENU
ECHO =============================
ECHO.
ECHO  1. Run Word Processor
ECHO  2. Run Spreadsheet
ECHO  3. Run Games
ECHO  4. Exit to DOS
ECHO.
CHOICE /C:1234 /N Choose an option:
IF ERRORLEVEL 4 GOTO END
IF ERRORLEVEL 3 GOTO GAMES
IF ERRORLEVEL 2 GOTO SPREAD
IF ERRORLEVEL 1 GOTO WORD
:WORD
WS.EXE
GOTO MENU
:SPREAD
123.EXE
GOTO MENU
:GAMES
CD \GAMES
GAME.EXE
CD \
GOTO MENU
:END
CLS
ECHO Goodbye!

CONFIG.SYS and AUTOEXEC.BAT

Every DOS system had these two critical files:

C:\\CONFIG.SYS
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS
DOS=HIGH,UMB
FILES=40
BUFFERS=20
LASTDRIVE=Z
C:\\AUTOEXEC.BAT
@ECHO OFF
PATH C:\DOS;C:\WINDOWS;C:\TOOLS
SET TEMP=C:\TEMP
PROMPT $P$G
DOSKEY
MOUSE.COM
C:\DOS\SMARTDRV.EXE

Pro Tips

Tip: Use DOSKEY to get command history with the up/down arrow keys. Without it, you’re retyping everything.
Tip: The PROMPT $P$G command shows the current directory in your prompt. The default C> tells you nothing about where you are.

For more DOS nostalgia, visit the FreeDOS Project - a complete, free DOS-compatible operating system.