DOS commands list
DOS. The Disk Operating System. Those were the days ;-) Very popular in the eighties and beyond. The 'before Windows' era, when people used their fingers to type commands and get their computers to do things. The computer mouse wasn't invented yet. Internet? Never heard of. And yet, our ancestors did about 80% of the things we do today with our Windows and Mac PC's with DOS. Nostalgia ;-) It was rather simple, straightforward and extremely stable. They had word processors, anti-virus programs, databases, programming languages (Basic, C, Cobol, Dbase,..), data manipulation, spreadsheets, networks.. and less, oh so much less, updates, bugfixes and 'hanging' computers. A reboot did the trick about 99% of the time. But they didn't have the www, video clips, facebook or twitter. But they had email, bulletin board systems (an Internet where one single computer talked to another one over a telephone line. Yes, you had to dial in!). At these bulletin boards systems (they were called BBS's) you could find forums, files, freeware & shareware, messages and music files. Really like the internet but one user at a time ;-) These pre-historic computer users had so much more free time. They were quite patient as well. Unbelievable! DOS is still available within Windows. Here's a list of all DOS commands.
List of all DOS commands APPEND
APPEND [/X:on|off][/path:on|off] [/E]
Displays or sets the search path for data files. DOS will search the specified path(s) if the file is not found in the current path.
ASSIGN x=y [...] /sta
Redirects disk drive requests to a different drive.
ATTRIB [d:][path]filename [/S]
ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H] [d:][path]filename [/S]
Sets or displays the read-only, archive, system, and hidden attributes of a file or directory.
BACKUP d:[path][filename] d:[/S][/M][/A][/F:(size)] [/P][/D:date] [/T:time] [/L:[path]filename]
Makes a backup copy of one or more files. (In DOS Version 6, this program is stored on the DOS supplemental disk.)
Used from the DOS prompt or in a batch file or in the CONFIG.SYS file to set (or display) whether or not DOS should check for a Ctrl + Break key combination.
Used in the CONFIG.SYS file to set the number of disk buffers (number) that will be available for use during data input. Also used to set a value for the number of sectors to be read in advance (read-ahead) during data input operations.
CALL [d:][path]batchfilename [options]
Calls another batch file and then returns to current batch file to continue.
Displays the current code page or changes the code page that DOS will use.
CHDIR (CD) [d:]path
Displays working (current) directory and/or changes to a different directory.
CHKDSK [d:][path][filename] [/F][/V]
Checks a disk and provides a file and memory status report.
CHOICE [/C[:]keys] [/N][/S][/T[:]c,nn] [text]
Used to provide a prompt so that a user can make a choice while a batch program is running.
CLS (Clear Screen)
Clears (erases) the screen.
COMMAND [d:][path] [device] [/P][/E:(size)] [/MSG][/Y [/C (command)|/K (command)]
Starts a new version of the DOS command processor (the program that loads the DOS Internal programs).
COMP [d:][path][filename] [d:][path][filename] [/A][/C][/D][/L][/N:(number)]
Compares two groups of files to find information that does not match. (See FC command).
COPY [/Y|-Y] [/A][/B] [d:][path]filename [/A][/B] [d:][path][filename] [/V]
COPY [/Y|-Y][/A][/B] [d:][path]filename+[d:][path]filename[...][d:][path][filename] [/V]
Copies and appends files.
COUNTRY=country code,[code page][,][d:][filename]
Used in the CONFIG.SYS file to tell DOS to use country-specific text conventions during processing.
Changes the standard I/O (Input/Output) device to an auxiliary device.
Displays and/or sets the system date.
DBLSPACE / automount=drives
DBLSPACE /chkdsk [/F] [d:]
DBLSPACE /compress d: [/newdrive=host:] [/reserve=size] [/F]
DBLSPACE /create d: [/newdrive=host:] [/reserve=size] [/size=size]
DBLSPACE /defragment [d:] ]/F]
DBLSPACE /delete d:
DBLSPACE /format d:
DBLSPACE [/info] [d:]
DBLSPACE /mount[=nnn] host: [/newdrive=d:]
DBLSPACE /ratio[=ratio] [d:] [/all]
DBLSPACE /size[=size] [/reserve=size] d:
DBLSPACE /uncompress d:
DBLSPACE /unmount [d:]
A program available with DOS 6.0 that allows you to compress information on a disk.
DEBUG [pathname] [parameters]
An MS-DOS utility used to test and edit programs.
DEFRAG [d:] [/F][/S[:]order] [/B][/skiphigh [/LCD|/BW|/GO] [/H]
DEFRAG [d:] [/V][/B][/skiphigh] [/LCD]|/BW|/GO] [/H]
Optimizes disk performance by reorganizing the files on the disk.
DEL (ERASE) [d:][path]filename [/P]
Deletes (erases) files from disk.
Deletes all files from previous versions of DOS after a 5.0 or 6.0 installation.
DELTREE [/Y] [d:]path [d:]path[...]
Deletes (erases) a directory including all files and subdirectories that are in it.
Used in the CONFIG.SYS file to tell DOS which device driver to load.
Like DEVICE, DEVICEHIGH is used in the CONFIG.SYS file to tell DOS which device driver software to use for devices however, this option is used to install the device driver into the upper memory area.
DIR [d:][path][filename] [/A:(attributes)] [/O:(order)] [/B][/C][/CH][/L][/S][/P][/W]
Displays directory of files and directories stored on disk.
DISKCOMP [d:] [d:][/1][/8]
Compares the contents of two diskettes.
DISKCOPY [d:] [d:][/1][/V][/M]
Makes an exact copy of a diskette.
Used in the CONFIG.SYS file to specify the memory location for DOS. It is used to load DOS into the upper memory area and to specify whether or not the upper memory blocks will be used.
DOSKEY [reinstall] [/bufsize=size][/macros][/history][/insert|/overstrike] [macroname=[text]]
Loads the Doskey program into memory which can be used to recall DOS commands so that you can edit them.
DOSSHELL [/B] [/G:[resolution][n]]|[/T:[resolution][n]]
Initiates the graphic shell program using the specified screen resolution.
DRIVPARM= /D:(number) [/C] [/F:(form factor)] [/H:(number)] [/I][ /N][/S:(number)] [/T:(tracks)]
Used in the CONFIG.SYS file to set parameters for a disk drive.
Displays messages or turns on or off the display of commands in a batch file.
EDIT [d:][path]filename [/B][/G][/H][/NOHI]
Starts the MS-DOS editor, a text editor used to create and edit ASCII text files.
EMM386 [on|off|auto] [w=on|off]
Enables or disables EMM386 expanded-memory support on a computer with an 80386 or higher processor.
EXE2BIN [d:][path]filename [d:][path]filename
Converts .EXE (executable) files to binary format.
Exits a secondary command processor.
EXPAND [d:][path]filename [[d:][path]filename[ . . .]]
Expands a compressed file.
FASTHELP [command][command] /?
Displays a list of DOS commands with a brief explanation of each.
Keeps track of the locations of files for fast access.
FC [/A][/C][/L][/Lb n][/N][/T][/W][number] [d:][path]filename [d:][path]filename
or (for binary comparisons)
FC [/B][/number] [d:][path]filename [d:][path]filename
Displays the differences between two files or sets of files.
Used in the CONFIG.SYS file to specify the number of file-control blocks for file sharing.
Prepares a fixed disk to accept DOS files for storage.
Used in the CONFIG.Sys file to specify the maximum number of files that can be open at the same time.
FIND [/V][/C][/I][/N] string [d:][path]filename[...]
Finds and reports the location of a specific string of text characters in one or more files.
FOR %%(variable) IN (set) DO (command)
or (for interactive processing)
FOR %(variable) IN (set) DO (command)
Performs repeated execution of commands (for both batch processing and interactive processing).
FORMAT d:[/1][/4][/8][/F:(size)] [/N:(sectors)] [/T:(tracks)][/B|/S][/C][/V:(label)] [/Q][/U][/V]
Formats a disk to accept DOS files.
Causes unconditional branch to the specified label.
GRAFTABL [(code page)]
Loads a table of character data into memory (for use with a color/graphics adapter).
GRAPHICS [printer type][profile] [/B][/R][/LCD][/PB:(id)] [/C][/F][/P(port)]
Provides a way to print contents of a graphics screen display.
HELP [command] [/B][/G][/H][/NOHI]
Displays information about a DOS command.
IF [NOT] EXIST filename (command) [parameters]
IF [NOT] (string1)==(string2) (command) [parameters]
IF [NOT] ERRORLEVEL (number) (command) [parameters]
Allows for conditional operations in batch processing.
Used in the CONFIG.SYS file to allow you to use the commands from one CONFIG.SYS block within another.
INSTALL=[d: ][\path]filename [parameters]
Used in the CONFIG.SYS file to load memory-resident programs into conventional memory.
Connects two computers via parallel or serial ports so that the computers can share disks and printer ports.
INTERSVR [d:][...][/X=d:][...] [/LPT:[n|address]] [/COM:[n|address]][/baud:rate] [/B][/V]
Starts the Interlink server.
JOIN d: [d:path]
JOIN d: [/D]
Allows access to the directory structure and files of a drive through a directory on a different drive.
KEYB [xx][,][yyy][,][d:][path]filename [/E][/ID:(number)]
Loads a program that replaces the support program for U. S. keyboards.
LABEL [d:][volume label]
Creates or changes or deletes a volume label for a disk.
Used in the CONFIG.SYS file to set the maximum number of drives that can be accessed.
LOADFIX [d:][path]filename [parameters]
Ensures that a program is loaded above the first 64K of conventional memory, and runs the program.
LOADHIGH (LH) [d:][path]filename [parameters]
Loads memory resident application into reserved area of memory (between 640K-1M).
MEM [/program|/debug|/classify|/free|/module(name)] [/page]
Displays amount of installed and available memory, including extended, expanded, and upper memory.
MEMMAKER [/B][/batch][/session][/swap:d] [/T][/undo][/W:size1,size2]
Starts the MemMaker program, a program that lets you optimize your computer's memory.
Used in the CONFIG.SYS file to set the colors that will be used by DOS to display text on the screen.
Used in the CONFIG.SYS file to set the startup configuration that will be used by DOS if no key is pressed within the specified timeout period.
Used in the CONFIG.SYS file to create a start-up menu from which you can select a group of CONFIG.SYS commands to be processed upon reboot.
MIRROR [d:]path [d:] path [...]
MIRROR [d1:][d2:][...] [/T(drive)(files)] [/partn][/U][/1]
Saves disk storage information that can be used to recover accidentally erased files.
MKDIR (MD) [d:]path
Creates a new subdirectory.
MODE LPT#[:]=COMn [retry]
MODE (device) CODEPAGE PREPARE=(codepage) [d:][path]filename
MODE (device) CODEPAGE PREPARE=(codepage list) [d:][path]filename
MODE (device) CODEPAGE SELECT=(codepage)
MODE (device) CODEPAGE [/STATUS]
MODE (device) CODEPAGE REFRESH
Sets mode of operation for devices or communications.
MORE < (filename or command)
Sends output to console, one screen at a time.
MOVE [/Y|/-Y] [d:][path]filename[,[d:][path]filename[...]] destination
Moves one or more files to the location you specify. Can also be used to rename directories.
MSAV [d:] [/S|/C][/R][/A][/L][/N][/P][/F][/video][/mouse]
Scans your computer for known viruses.
MSBACKUP [setupfile] [/BW|/LCD|/MDA]
Used to backup or restore one or more files from one disk to another.
MSCDEX /D:driver [/D:driver2. . .] [/E][/K][/S][/V][/L:letter] [/M:number]
Used to gain access to CD-ROM drives (new with DOS Version 6).
Used to load a file with country-specific information.
Used in the CONFIG.SYS file to specify the state of the NumLock key.
Sets or displays directories that will be searched for programs not in the current directory.
Suspends execution of a batch file until a key is pressed.
Used to turn power management on and off, report the status of power management, and set levels of power conservation.
PRINT [/B:(buffersize)] [/D:(device)] [/M:(maxtick)] [/Q:(value] [/S:(timeslice)][/U:(busytick)] [/C][/P][/T] [d:][path][filename] [...]
Queues and prints data files.
PROMPT [prompt text] [options]
Changes the DOS command prompt.
Resolves sector problems on a file or a disk. (Beginning with DOS Version 6, RECOVER is no longer available ).
Used in batch files and in the CONFIG.SYS file to insert remarks (that will not be acted on).
RENAME (REN) [d:][path]filename [d:][path]filename
Changes the filename under which a file is stored.
REPLACE [d:][path]filename [d:][path] [/A][/P][/R][/S][/U][/W]
Replaces stored files with files of the same name from a different storage location.
RESTORE d: [d:][path]filename [/P][/S][/B:mm-dd-yy] [/A:mm-dd-yy][/E:hh:mm:ss] [/L:hh:mm:ss] [/M][/N][/D]
Restores to standard disk storage format files previously stored using the BACKUP command.
RMDIR (RD) [d:]path
Removes a subdirectory.
SCANDISK [d: [d: . . .]|/all][/checkonly|/autofix[/nosave]|/custom][/surface][/mono][/nosummay]
SCANDISK /fragment [d:][path]filename
SCANDISK /undo [undo-d:][/mono]
Starts the Microsoft ScanDisk program which is a disk analysis and repair tool used to check a drive for errors and correct any problems that it finds.
SELECT [d:] [d:][path] [country code][keyboard code]
Formats a disk and installs country-specific information and keyboard codes (starting with DOS Version 6, this command is no longer available).
Inserts strings into the command environment. The set values can be used later by programs.
SETVER [d:]:path][filename (number)][/delete][/quiet]
Displays the version table and sets the version of DOS that is reported to programs.
SHARE [/F:space] [/L:locks]
Installs support for file sharing and file locking.
Used in the CONFIG.SYS file to specify the command interpreter that DOS should use.
Increases number of replaceable parameters to more than the standard ten for use in batch files.
SORT [/R][/+n] < (filename)
SORT [/R][/+n] > (filename2)
Sorts input and sends it to the screen or to a file.
Used in the CONFIG.SYS file to set the number of stack frames and the size of each stack frame.
Used in the CONFIG.SYS file to create a multilevel menu from which you can select start-up options.
SUBST d: d:path
SUBST d: /D
Substitutes a virtual drive letter for a path designation.
Used in the CONFIG.SYS file to configure DOS in a special way for example, to tell DOS to emulate different hardware configurations.
SYS [source] d:
Transfers the operating system files to another disk.
Displays current time setting of system clock and provides a way for you to reset the time.
TREE [d:][path] [/A][/F]
Displays directory paths and (optionally) files in each subdirectory.
Displays the contents of a file.
UNDELETE [d:][path][filename] [/DT|/DS|/DOS]
Restores files deleted with the DELETE command.
UNFORMAT d: [/J][/L][/test][/partn][/P][/U]
Used to undo the effects of formatting a disk.
Displays the DOS version number.
Turns on the verify mode the program checks all copying operations to assure that files are copied correctly.
Displays a disk's volume label.
XCOPY [d:][path]filename [d:][path][filename] [/A][/D:(date)] [/E][/M][/P][/S][/V][/W][Y\-Y]
Copies directories, subdirectories, and files.
Index page Index