List of DOS commands
This article lists notable commands provided by the MS-DOS disk operating system, especially as used on an IBM PC compatible computer. Other DOS variants as well as the legacy Windows shell, Command Prompt, provide many of these commands. Many other DOS variants are informally called DOS, but are not included in the scope of the list. The highly related variant, IBM PC DOS, is included. The list is not intended to be exhaustive, but does include commands covering the various releases.
Each command is implemented either as built-in to the command interpreter, COMMAND.COM, or as an external program. Although prevailing style is to write command names in all caps, the interpreter matches ignoring case.
Commands
APPEND
Sets the path to be searched for data files or displays the current search path.The APPEND command is similar to the PATH command that tells DOS where to search for program files.
The command is available in MS-DOS versions 3.2 and later.
ASSIGN
Redirects requests for disk operations on one drive to a different drive. It can also display drive assignments or reset all drive letters to their original assignments.The command is available in MS-DOS versions 3 through 5 and IBM PC DOS releases 2 through 5.
ATMDM
Lists connections and addresses seen by Windows ATM call manager.ATTRIB
Changes or views the attributes of one or more files. Defaults to display the attributes of all files in the current directory. The file attributes available include read-only, archive, system, and hidden attributes. The command has the capability to process whole folders and subfolders of files and also process all files.The command is available in MS-DOS versions 3 and later.
BACKUP and RESTORE
These are commands to backup and restore files from an external disk. These appeared in version 2, and continued to PC DOS 5 and MS-DOS 6. In DOS 6, these were replaced by commercial programs, which allowed files to be restored to different locations.BASIC and BASICA
Environment for programming in BASIC. IBM computers had BASIC 1.1 in ROM, and IBM's versions of BASIC used code in this ROM-BASIC, which allowed for extra memory in the code area. BASICA last appeared in IBM PC DOS 5.02, and in OS/2, the version had ROM-BASIC moved into the program code. Microsoft released GW-BASIC for machines with no ROM-BASIC. Some OEM releases had basic.com and basica.com as loaders for GW-BASIC.EXE. BASIC was dropped after MS-DOS 4, and PC DOS 5.02. OS/2, has it, while MS-DOS 5 does not.BREAK
Instructs DOS to check whether the and keys have been pressed before carrying out a program request.The command is available in MS-DOS versions 2 and later.
CALL
Starts a batch file from within another batch file and returns when that one ends.The command is available in MS-DOS versions 3.3 and later.
CD and CHDIR
Sets the working directory or with no arguments displays the current value. Both names, CD and CHDIR, refer to the same command and are abbreviations of the phrase "change directory".The command is available in MS-DOS versions 2 and later.
CHCP
Either displays or changes the active code page used to display character glyphs in a console window. Similar functionality can be achieved with[|MODE] CON: CP SELECT=.The command is available in MS-DOS versions 3.3 and later.
CHKDSK
Verifies and possibly fixes data integrity of a storage volume.The command is available in MS-DOS versions 1 and later.
CHOICE
Prompts the user to select one item from a set of single-character choices. The command was introduced as an external command with MS-DOS 6.0, Novell DOS 7 and PC DOS 7.0. Earlier versions of DR-DOS supported this function with the built-in switch command or by beginning a command with a question mark. This command was formerly called ync.CLS
The CLS or CLRSCR command clears the terminal screen.The command is available in MS-DOS versions 2 and later.
COMMAND
Start a new instance of the command interpreter.The command is available in MS-DOS versions 1 and later.
COMP
Show differences between any two files, or any two sets of files.The command is available in MS-DOS versions 3.3 through 5 and IBM PC DOS releases 1 through 5.
COPY
Makes copies of files.The command is available in MS-DOS versions 1 and later.
CTTY
Defines the terminal device to use for input and output.The command is available in MS-DOS versions 2 and later.
DATE
Displays the system date and prompts the user to enter a new date. Complements the [|TIME] command.The command is available in MS-DOS versions 1 and later.
DBLBOOT
A batch file added to DOS 6.X Supplemental Disks to help create DoubleSpace boot floppies.DBLSPACE
A disk compression utility supplied with MS-DOS version 6.0 and version 6.2.DEBUG
A primitive assembler and disassembler.DEFRAG
Analyzes the file fragmentation of a disk drive and defragments a drive. This command is called DEFRAG in MS-DOS/PC DOS and diskopt in DR-DOS.The command is available in MS-DOS versions 6 and later.
[|DEL and ERASE]
Deletes files. Both names provide the same functionality.The command is available in MS-DOS versions 1 and later.
DELTREE
Deletes a directory along with all of the files and subdirectories that it contains. Normally, it will ask for confirmation of the potentially dangerous action. Since the RD command can not delete a directory if the directory is not empty, the DELTREE command can be used to delete the whole directory.The
deltree command is included in certain versions of Microsoft Windows and MS-DOS operating systems. It is specifically available only in versions of MS-DOS 6.0 and higher, and in Microsoft Windows 9x. In Windows NT, the functionality provided exists but is handled by the command or which has slightly different syntax. In Windows 10, the command switch is or.DIR
Displays the contents of a directory. Output consists of the disk's volume label and serial number; one directory or filename per line, including the filename extension, the file size in bytes, and the date and time the file was last modified; and the total number of files listed, their cumulative size, and the free space remaining on the disk. The command is one of the few commands that exist from the first versions of DOS. The command can display files in subdirectories. The resulting directory listing can be sorted by various criteria and filenames can be displayed in a chosen format.DISKCOMP
Compares the complete contents of a floppy disk to another one.The command is available in MS-DOS versions 3.2 and later and IBM PC DOS releases 1 and later.
DISKCOPY
Copies the complete contents of a diskette to another diskette.The command is available in MS-DOS versions 2 and later.
DOSKEY
Adds command history, macro functionality, and improved editing features to the command-line interpreter.The command is available in MS-DOS versions 5 and later.
DOSSIZE
Displays how much memory various DOS components occupy.DRVSPACE
A disk compression utility supplied with MS-DOS version 6.22.ECHO
Prints text to the DOS equivalent of the standard output stream. Usually, this means directly to the screen, but the output can be redirected, like any other command, to files or devices. Often used in batch file.Another important use of the echo command is to toggle echoing of commands on and off in batch files. Traditionally batch files begin with the
@echo off statement. This says to the interpreter that echoing of commands should be off during the whole execution of the batch file, thus resulting in a "tidier" output The command is available in MS-DOS versions 2 and later.
EDIT
A full-screen text editor, included with MS-DOS versions 5 and 6, OS/2 and Windows NT to 4.0. The corresponding program in Windows 95 and later, and Windows 2000 and later is Edit v2.0. PC DOS 6 and later use the DOS E Editor and DR-DOS used editor up to version 7.EDLIN
DOS line-editor. It can be used with a script file, like debug, this makes it of some use even today. The absence of a console editor in MS-DOS/PC DOS 1–4 created an after-market for third-party editors.In DOS 5, an extra command "?" was added to give the user much-needed help.
DOS 6 was the last version to contain EDLIN; for MS-DOS 6, it's on the supplemental disks, while PC DOS 6 had it in the base install. Windows NT 32-bit, and OS/2 have Edlin.
EMM386
Enables or disables EMM386 expanded-memory support on a computer with an 80386 or higher processor.The command is available in MS-DOS versions 5 and later.
ERASE
See: DEL and ERASEEXE2BIN
Converts an executable file into a binary file with the extension.com, which is a memory image of the program.The size of the resident code and data sections combined in the input.exe file must be less than 64 KB. The file must also have no stack segment.
The command is available in MS-DOS versions 1 through 5. It is available separately for version 6 on the Supplemental Disk.
EXIT
Exits the current command processor. If the exit is used at the primary command, it has no effect unless in a DOS window under Microsoft Windows, in which case the window is closed and the user returns to the desktop.The command is available in MS-DOS versions 2 and later.
EXPAND
The Microsoft File Expansion Utility is used to uncompress one or more compressed cabinet files. The command dates back to 1990 and was supplied on floppy disc for MS-DOS versions 5 and later.FAKEMOUS
An IBM PS/2 mouse utility used with AccessDOS. It is included on the MS-DOS 6 Supplemental Disk.AccessDOS assists persons with disabilities.