DOS Command Reference K-Z
The following command list identifies the DOS version when each command (and some parameters) first came into use and for commands no longer supported the last version where the command was used. Note that many commands were removed in DOS 6.0 and DOS 7.0 (Windows 95) as they had been long superseded by other commands or by windows functionality. This reference deals with IBM's PC-DOS and Microsoft's MS-DOS (which were both originally created by Microsoft and supposedly identical). Other versions of DOS may have different commands. Not all flags available in DOS 6.0 and DOS 7.0 have been listed, use the /? flag with the command to get a complete list.
- KEYB (DOS 3.2 internal command)
- loads a keyboard program
- LABEL (DOS 3.2 external command)
- used to add, change, or delete a disk volume label
- LASTDRIVE (DOS 3.0 internal command - config)
- used to set the maximum number of disk drives that can be allocated
- LOADHIGH (DOS 5.0 internal command)
- load a program into the upper memory area
- LINK(DOS 1.0 external command)
- connects assembled modules to create an executable program
- MEM(DOS 4.0 external command)
- displays the amount of free and used memory and what is using it
/PROGRAM flag only lists programs whereas /DEBUG flag also lists drivers and other info
DOS 5.0 adds the /CLASSIFY flag which includes all programs including those in the upper memory area
- MIRROR (DOS 5.0 external command) DOS 6.0 no longer valid
- save information for use with unformat and undelete
- MKDIR or MD (DOS 2.0 internal command)
- used to create a new directory
format: MKDIR new-directory or MD new-directory
- MODE (DOS 3.2 internal command)
- set operating mode for devices
format: MODE LPTn:chars,lines,P
or MODE COMn:baud,parity,databits,stopbits,P
or MODE LPTn=COMm
or MODE display,shift,T
or MODE device CODEPAGE prepare-or-select-or-refresh
- MORE (DOS 2.0 external command)
- sends output to the screen one screenful at a time
- MOVE (DOS 6.0 external command)
- used to move a file from one name (or place) to another
format: MOVE from-location to-location
- MSBACKUP (DOS 6.0 external command) DOS 7.0 no longer valid
- interactive backup and restore
- MSD (DOS 6.0 external command) DOS 7.0 no longer valid
- diagnostic routines
- NLSFUNC (DOS 3.3 internal command)
- loads country specific information from a file other than COUNTRY.SYS
- PATH (DOS 2.0 internal command)
- used to display the current path list
or with optional list of directories creates a new path list
- PAUSE (DOS 1.0 internal command - batch)
- used to suspend execution in batch files,
execution will resume when any key except CTRL-C is pressed.
CTRL-C will cancel execution.
any parameters on this command will be displayed on the screen when the command is executed
- PRINT (DOS 2.0 external command) DOS 7.0 no longer valid
- sends output to the spooler for printing and returns control to the console while continuing to print in the background
format: PRINT file-to-print flags
valid flags are- /D identify the print device if not PRN
- /B:size size of print buffer in bytes (first call only)
- /U:valuetime to wait for printer availability (first call only)
- /M:value maximum time to print a file (first call only)
- /S:value size of timeslice for printing (first call only)
- /Q:value maximum files inqueue (first call only)
- /T delete all files in the queue
- /C cancels printing of the specified and following files
- /P reinstates specified file and all following files to the queue
- PROMPT (DOS 2.0 internal command)
- used to change the way that the DOS prompt displays
- RECOVER (DOS 2.0 external command) DOS 6.0 no longer valid
- used to recover data from a disk which has developed bad sectors
format: RECOVER file-or-path
- REM (DOS 1.0 internal command - batch)
- indicates that this line of a batch file contains a comment
- REName (DOS 1.0 internal command)
- used to rename a file from one name to another without moving it
format: REName from-location to-location
this command accepts wildcard characters
- REPLACE (DOS 3.2 internal command) DOS 7.0 no longer valid
- replaces files in one directory with files from another
format: REPLACE from-directory to-directory flags
valid flags are- /A add new files instead of replacing existing ones
- /P prompts before replacing files
- /R allow readonly files to be replaced
- /S search sub-directories of the to-directory
- /W wait for disk insertion before searching for source files
- /U only replace files older than the source (DOS 4.0 onward)
- RESTORE (DOS 3.0 external command) DOS 7.0 no longer valid
- used to restore files previously backed up format: RESTORE directory-to-backup backup-to-drive flags
valid flags are- /S restore subdirectories as well
- /P prompt for permission to restore hidden/readonly files
- /B:date only restore files modified on or before the specified date
- /A:date only restore files modified on or after the specified date
- /E:time only restore files modified at or before the specified time
- /L:time only restore files modified at or after the specified time
- /M only restore files modified since the last backup
- /N only restore files that no longer exist
- /D displays list of files without actually restoring (DOS 5.0 onwards)
- RMDIR or RD (DOS 2.0 internal command)
- used to delete a directory
format: RMDIR directory or RD directory
- SCANDISK (DOS 6.0 external command)
- disk analysis and repair tool (replacement for CHKDSK)
- SELECT (DOS 3.3 internal command)
- used to select the keyboard type when you first access DOS
for DOS 4.0 onward a full-screen installation and configuration program
this program removed from DOS 5.0
- SET (DOS 3.1 internal command)
- used to update or display environment parameters
- SETVER (DOS 5.0 external command)
- set the DOS version that DOS will report to programs
- SHARE (DOS 3.1 external command)
- installs file sharing and locking format: SHARE flags
valid flags are- /F:space allocate filespace for share info
- /L:locks allocate allowable number of locks
- SHELL (DOS 3.1 internal command - config)
- start execution of an alternative command shell
- SHIFT (DOS 2.0 internal command - batch)
- used to allow more than ten parameters to be passed to a batch file
- SORT (DOS 2.0 external command)
- used to sort the contents of a file format: SORT file-in file-out flags
valid flags are- /R sort in reverse order
- /+number identifies the column to sort
- STACKS (DOS 3.3 internal command - config)
- used to support dynamic use of data stacks
- SUBST (DOS 3.1 external command)
- substitutes a virtual drive for a path name format: SUBST drive path flags
the /D flag is used to turn off a subst
- SWITCHES=/K (DOS 5.0 internal command - config)
- used to make an AT keyboard behave like a PC one
- SYS(DOS 1.0 external command)
- transfers the DOS system files to a specified disk
- TIME (DOS 1.0 internal command)
- displays the current time
or with optional parameter sets the current time to the specified value
- TREE (DOS 3.2 internal command) DOS 7.0 no longer valid
- lists full path of each directory along with all sub-directories
- TYPE (DOS 1.0 internal command)
- used to display the contents of a file
format: TYPE filename
this command does NOT accept wildcards
- UNDELETE (DOS 5.0 external command) DOS 7.0 no longer valid
- used to restore files deleted with the DEL command
- UNFORMAT (DOS 5.0 external command) DOS 7.0 no longer valid
- used to restore files deleted with the FORMAT or RECOVER command
- VER (DOS 2.0 internal command)
- used to display the operating system version number
- VERIFY (DOS 2.0 internal command)
- used to verify all writes to a disk
format: VERIFY ON or VERIFY OFF
- VOL (DOS 2.0 internal command)
- used to display the disk volume serial number if there is one
- VSAFE (DOS 6.0 external command) DOS 7.0 no longer valid
- monitor for potential virus activity
- XCOPY (DOS 3.2 internal command)
- used to copy a directory and all of its sub-directories from one name (or place) to another
format: XCOPY from-location to-location flags
to-location defaults to the current path and is optional
this command accepts wildcard characters
valid flags are- /A only copies files with archive bit set
- /D:date only copies files modified on or after specified date
- /E copy empty sub-directories as well
- /M as /A but also turns off archive bit on source
- /P prompt for each file
- /S includes sub-directories in copy except when empty otherwise only copies files in main directory
- /V verify files as they are written
- /W wait before starting


