You are on page 1of 5

DOS Command Index batch file to continue.

(Internal)
From the book
DOS the Easy Way CHCP CTTY (device)
by Everett Murdock Ph.D. (Internal)
NOTE: Changes the standard I/O (Input/Output) device to
The complete index to DOS commands can be CHCP (codepage) an auxiliary device.
found at
www.easydos.com Displays the current code page or changes the code DATE
page that DOS will use. (Internal)
For more information about the book DOS the Easy
Way CHDIR DATE mm-dd-yy
click here to go to (Internal)
WWW.EASYDOS.COM Displays and/or sets the system date.
CHDIR (CD) [d:]path
Select the command name for complete information CHDIR (CD)[..] DBLSPACE
about that command and examples of its use. (External)
Displays working (current) directory and/or changes
APPEND to a different directory. DBLSPACE / automount=drives
(External) DBLSPACE /chkdsk [/F] [d:]
CHKDSK DBLSPACE /compress d: [/newdrive=host:]
APPEND ; (External) [/reserve=size] [/F]
APPEND [d:]path[;][d:]path[...] DBLSPACE /create d: [/newdrive=host:]
APPEND [/X:on|off][/path:on|off] [/E] CHKDSK [d:][path][filename] [/F][/V] [/reserve=size] [/size=size]
DBLSPACE /defragment [d:] ]/F]
Displays or sets the search path for data files. DOS Checks a disk and provides a file and memory DBLSPACE /delete d:
will search the specified path(s) if the file is not status report. DBLSPACE /doubleguard=0|1
found in the current path. DBLSPACE /format d:
CHOICE DBLSPACE [/info] [d:]
ASSIGN (Internal) DBLSPACE /list
(External) DBLSPACE /mount[=nnn] host: [/newdrive=d:]
CHOICE [/C[:]keys] [/N][/S][/T[:]c,nn] [text] DBLSPACE /ratio[=ratio] [d:] [/all]
ASSIGN x=y [...] /sta DBLSPACE /size[=size] [/reserve=size] d:
Used to provide a prompt so that a user can make a DBLSPACE /uncompress d:
Redirects disk drive requests to a different drive. choice while a batch program is running. DBLSPACE /unmount [d:]

ATTRIB CLS (Clear Screen) A program available with DOS 6.0 that allows you to
(External) (Internal) compress information on a disk.

ATTRIB [d:][path]filename [/S] CLS DEBUG


ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H] [d:] (External)
[path]filename [/S] Clears (erases) the screen.
DEBUG [pathname] [parameters]
Sets or displays the read-only, archive, system, and COMMAND
hidden attributes of a file or directory. (External) An MS-DOS utility used to test and edit programs.

BACKUP COMMAND [d:][path] [device] [/P][/E:(size)] [/MSG] DEFRAG


(External) [/Y [/C (command)|/K (command)] (External)

BACKUP d:[path][filename] d:[/S][/M][/A][/F:(size)] Starts a new version of the DOS command DEFRAG [d:] [/F][/S[:]order] [/B][/skiphigh
[/P][/D:date] [/T:time] [/L:[path]filename] processor (the program that loads the DOS Internal [/LCD|/BW|/GO] [/H]
programs). DEFRAG [d:] [/V][/B][/skiphigh] [/LCD]|/BW|/GO] [/H]
Makes a backup copy of one or more files. (In DOS
Version 6, this program is stored on the DOS COMP Optimizes disk performance by reorganizing the files
supplemental disk.) (External) on the disk.

BREAK COMP [d:][path][filename] [d:][path][filename] [/A][/C]


(Internal) [/D][/L][/N:(number)] DEL (ERASE)
(Internal)
BREAK =on|off Compares two groups of files to find information that
does not match. (See FC command). DEL (ERASE) [d:][path]filename [/P]
Used from the DOS prompt or in a batch file or in the
CONFIG.SYS file to set (or display) whether or not COPY Deletes (erases) files from disk.
DOS should check for a Ctrl + Break key (Internal)
combination. DELOLDOS
COPY [/Y|-Y] [/A][/B] [d:][path]filename [/A][/B] [d:] (External)
BUFFERS [path][filename] [/V]
(Internal) or DELOLDOS [/B]
COPY [/Y|-Y][/A][/B] [d:][path]filename+[d:]
BUFFERS=(number),(read-ahead number) [path]filename[...][d:][path][filename] [/V] Deletes all files from previous versions of DOS after
a 5.0 or 6.0 installation.
Used in the CONFIG.SYS file to set the number of Copies and appends files.
disk buffers (number) that will be available for use DELTREE
during data input. Also used to set a value for the COUNTRY (External)
number of sectors to be read in advance (read- (Internal)
ahead) during data input operations. DELTREE [/Y] [d:]path [d:]path[...]
COUNTRY=country code,[code page][,][d:][filename]
CALL Deletes (erases) a directory including all files and
(Internal) Used in the CONFIG.SYS file to tell DOS to use subdirectories that are in it.
country-specific text conventions during processing.
CALL [d:][path]batchfilename [options]
DEVICE
Calls another batch file and then returns to current CTTY
(Internal) FC [/B][/number] [d:][path]filename [d:][path]filename
Used in the CONFIG.SYS file to set parameters for
DEVICE=(driver name) a disk drive. Displays the differences between two files or sets of
files.
Used in the CONFIG.SYS file to tell DOS which
device driver to load. ECHO
(Internal) FCBS
(Internal)
DEVICEHIGH ECHO on|off
(Internal) ECHO (message) FCBS=(number)

DEVICEHIGH=(driver name) Displays messages or turns on or off the display of Used in the CONFIG.SYS file to specify the number
commands in a batch file. of file-control blocks for file sharing.
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 EDIT FDISK
used to install the device driver into the upper (External) (External)
memory area.
EDIT [d:][path]filename [/B][/G][/H][/NOHI] FDISK [/status]

DIR Starts the MS-DOS editor, a text editor used to Prepares a fixed disk to accept DOS files for
(Internal) create and edit ASCII text files. storage.

DIR [d:][path][filename] [/A:(attributes)] [/O:(order)]


[/B][/C][/CH][/L][/S][/P][/W] EMM386 FILES
(External) (Internal)
Displays directory of files and directories stored on
disk. EMM386 [on|off|auto] [w=on|off] FILES=(number)

Enables or disables EMM386 expanded-memory Used in the CONFIG.Sys file to specify the
DISKCOMP support on a computer with an 80386 or higher maximum number of files that can be open at the
(External) processor. same time.

DISKCOMP [d:] [d:][/1][/8]


EXE2BIN FIND
Compares the contents of two diskettes. (External) (External)

EXE2BIN [d:][path]filename [d:][path]filename FIND [/V][/C][/I][/N] ÒstringÓ [d:][path]filename[...]


DISKCOPY
(External) Converts .EXE (executable) files to binary format. Finds and reports the location of a specific string of
text characters in one or more files.
DISKCOPY [d:] [d:][/1][/V][/M]
EXIT
Makes an exact copy of a diskette. (Internal) FOR
(Internal)
EXIT
DOS FOR %%(variable) IN (set) DO (command)
(Internal) Exits a secondary command processor.
or (for interactive processing)
DOS=[high|low],[umb|noumb] FOR %(variable) IN (set) DO (command)
EXPAND
Used in the CONFIG.SYS file to specify the memory (External) Performs repeated execution of commands (for both
location for DOS. It is used to load DOS into the batch processing and interactive processing).
upper memory area and to specify whether or not EXPAND [d:][path]filename [[d:][path]filename[ . . .]]
the upper memory blocks will be used.
Expands a compressed file. FORMAT
(External)
DOSKEY
(External) FASTHELP FORMAT d:[/1][/4][/8][/F:(size)] [/N:(sectors)] [/T:
(External) (tracks)][/B|/S][/C][/V:(label)] [/Q][/U][/V]
DOSKEY [reinstall] [/bufsize=size][/macros][/history]
[/insert|/overstrike] [macroname=[text]] FASTHELP [command][command] /? Formats a disk to accept DOS files.

Loads the Doskey program into memory which can Displays a list of DOS commands with a brief
be used to recall DOS commands so that you can explanation of each. GOTO
edit them. (Internal)

FASTOPEN GOTO (label)


DOSSHELL (External)
(External) Causes unconditional branch to the specified label.
FASTOPEN d:[=n][/X]
DOSSHELL [/B] [/G:[resolution][n]]|[/T:[resolution][n]]
Keeps track of the locations of files for fast access. GRAFTABL
Initiates the graphic shell program using the (External)
specified screen resolution.
FC GRAFTABL [(code page)]
(External) GRAFTABL [status]
DRIVPARM
(Internal) FC [/A][/C][/L][/Lb n][/N][/T][/W][number] [d:] Loads a table of character data into memory (for use
[path]filename [d:][path]filename with a color/graphics adapter).
DRIVPARM= /D:(number) [/C] [/F:(form factor)] [/H:
(number)] [/I][ /N][/S:(number)] [/T:(tracks)] or (for binary comparisons)
GRAPHICS KEYB [xx][,][yyy][,][d:][path]filename [/E][/ID: Used in the CONFIG.SYS file to create a start-up
(External) (number)] menu from which you can select a group of
CONFIG.SYS commands to be processed upon
GRAPHICS [printer type][profile] [/B][/R][/LCD][/PB: Loads a program that replaces the support program reboot.
(id)] [/C][/F][/P(port)] for U. S. keyboards.

Provides a way to print contents of a graphics LABEL MIRROR


screen display. (External) (External)

LABEL [d:][volume label] MIRROR [d:]path [d:] path [...]


HELP MIRROR [d1:][d2:][...] [/T(drive)(files)] [/partn][/U][/1]
(External) Creates or changes or deletes a volume label for a
disk. Saves disk storage information that can be used to
HELP [command] [/B][/G][/H][/NOHI] recover accidentally erased files.
LASTDRIVE
Displays information about a DOS command. (Internal)
MKDIR
LASTDRIVE=(drive letter) (MD) (Internal)
IF
(Internal) Used in the CONFIG.SYS file to set the maximum MKDIR (MD) [d:]path
number of drives that can be accessed.
IF [NOT] EXIST filename (command) [parameters] Creates a new subdirectory.
IF [NOT] (string1)==(string2) (command) LOADFIX
[parameters] (Internal)
IF [NOT] ERRORLEVEL (number) (command)
[parameters] LOADFIX [d:][path]filename [parameters] MODE
(External)
Allows for conditional operations in batch Ensures that a program is loaded above the first 64K
processing. of conventional memory, and runs the program. MODE n
MODE LPT#[:][n][,][m][,][P][retry]
LOADHIGH MODE [n],m[,T]
INCLUDE (Internal) MODE (displaytype,linetotal)
(Internal) MODE COMn[:]baud[,][parity][,][databits][,][stopbits]
LOADHIGH (LH) [d:][path]filename [parameters] [,][retry]
INCLUDE= blockname MODE LPT#[:]=COMn [retry]
Loads memory resident application into reserved MODE CON[RATE=(number)][DELAY=(number)]
Used in the CONFIG.SYS file to allow you to use the area of memory (between 640K-1M). MODE (device) CODEPAGE
commands from one CONFIG.SYS block within PREPARE=(codepage) [d:][path]filename
another. MODE (device) CODEPAGE PREPARE=(codepage
MEM list) [d:][path]filename
(External) MODE (device) CODEPAGE SELECT=(codepage)
INSTALL MODE (device) CODEPAGE [/STATUS]
(Internal) MEM MODE (device) CODEPAGE REFRESH
[/program|/debug|/classify|/free|/module(name)]
INSTALL=[d: ][\path]filename [parameters] [/page] Sets mode of operation for devices or
communications.
Used in the CONFIG.SYS file to load memory- Displays amount of installed and available memory,
resident programs into conventional memory. including extended, expanded, and upper memory. MORE
(External)
MEMMAKER
INTERLINK (External) MORE < (filename or command)
(External) (name)|MORE
MEMMAKER [/B][/batch][/session][/swap:d] [/T]
INTERLINK [client[:]=[server][:]] [/undo][/W:size1,size2] Sends output to console, one screen at a time.

Connects two computers via parallel or serial ports Starts the MemMaker program, a program that lets MOVE
so that the computers can share disks and printer you optimize your computer's memory. (Internal)
ports.
MENUCOLOR MOVE [/Y|/-Y] [d:][path]filename[,[d:]
INTERSVR (Internal) [path]filename[...]] destination
(External)
MENUCOLOR=textcolor,[background] Moves one or more files to the location you specify.
INTERSVR [d:][...][/X=d:][...] [/LPT:[n|address]] Can also be used to rename directories.
[/COM:[n|address]][/baud:rate] [/B][/V] Used in the CONFIG.SYS file to set the colors that
INTERSVR /RCOPY will be used by DOS to display text on the screen. MSAV
(External)
Starts the Interlink server.
MENUDEFAULT MSAV [d:] [/S|/C][/R][/A][/L][/N][/P][/F][/video]
(Internal) [/mouse]
JOIN MSAV /video
(External) MENUDEFAULT=blockname, [timeout]
Scans your computer for known viruses.
JOIN d: [d:path] Used in the CONFIG.SYS file to set the startup
JOIN d: [/D] configuration that will be used by DOS if no key is
pressed within the specified timeout period.
Allows access to the directory structure and files of a MSBACKUP
drive through a directory on a different drive. (External)
MENUITEM
(Internal) MSBACKUP [setupfile] [/BW|/LCD|/MDA]
KEYB
(External) MENUITEM=blockname, [menutext] Used to backup or restore one or more files from
one disk to another. Changes the DOS command prompt. Version 6, this command is no longer available).

MSCDEX RECOVER SET


(External) (External) (Internal)

MSCDEX /D:driver [/D:driver2. . .] [/E][/K][/S][/V] RECOVER [d:][path]filename SET (string1)=(string2)


[/L:letter] [/M:number] RECOVER d:
Inserts strings into the command environment. The
Used to gain access to CD-ROM drives (new with Resolves sector problems on a file or a disk. set values can be used later by programs.
DOS Version 6). (Beginning with DOS Version 6, RECOVER is no
longer available ). SETVER
MSD (External)
(External) REM
(Internal) SETVER [d:]:path][filename (number)][/delete]
MSD [/B][/I] [/quiet]
MSD [/I] [/F[d:][path]filename [/P[d:][path]filename REM [comment]
[/S[d:][path]filename Displays the version table and sets the version of
Used in batch files and in the CONFIG.SYS file to DOS that is reported to programs.
Provides detailed technical information about your insert remarks (that will not be acted on).
computer. SHARE
RENAME (REN) (External)
(Internal)
SHARE [/F:space] [/L:locks]
NLSFUNC RENAME (REN) [d:][path]filename [d:][path]filename
(External) Installs support for file sharing and file locking.

NLSFUNC [d:][path]filename Changes the filename under which a file is stored.


SHELL
Used to load a file with country-specific information. REPLACE (Internal)
(External)
NUMLOCK SHELL=[d:][path]filename [parameters]
(Internal) REPLACE [d:][path]filename [d:][path] [/A][/P][/R][/S]
[/U][/W] Used in the CONFIG.SYS file to specify the
NUMLOCK=on|off command interpreter that DOS should use.
Replaces stored files with files of the same name
Used in the CONFIG.SYS file to specify the state of from a different storage location.
the NumLock key. SHIFT
(Internal)
PATH RESTORE
(Internal) (External) SHIFT

PATH; RESTORE d: [d:][path]filename [/P][/S][/B:mm-dd- Increases number of replaceable parameters to


PATH [d:]path[;][d:]path[...] yy] [/A:mm-dd-yy][/E:hh:mm:ss] [/L:hh:mm:ss] [/M] more than the standard ten for use in batch files.
[/N][/D]
Sets or displays directories that will be searched for SORT
programs not in the current directory. Restores to standard disk storage format files (External)
previously stored using the BACKUP command.
SORT [/R][/+n] < (filename)
PAUSE SORT [/R][/+n] > (filename2)
(Internal) RMDIR (RD)
(Internal) Sorts input and sends it to the screen or to a file.
PAUSE [comment]
RMDIR (RD) [d:]path
Suspends execution of a batch file until a key is STACKS
pressed. Removes a subdirectory. (Internal)

POWER STACKS=(number),(size)
(External)
SCANDISK Used in the CONFIG.SYS file to set the number of
POWER [adv:max|reg|min]|std|off] (External) stack frames and the size of each stack frame.

Used to turn power management on and off, report SCANDISK [d: [d: . . .]|/all]
the status of power management, and set levels of [/checkonly|/autofix[/nosave]|/custom][/surface]
power conservation. [/mono][/nosummay] SUBMENU
SCANDISK volume- (Internal)
name[/checkonly|/autofix[/nosave]|/custom][/mono]
[/nosummary] SUBMENU=blockname, [menutext]
PRINT SCANDISK /fragment [d:][path]filename
(External) SCANDISK /undo [undo-d:][/mono] Used in the CONFIG.SYS file to create a multilevel
menu from which you can select start-up options.
PRINT [/B:(buffersize)] [/D:(device)] [/M:(maxtick)] Starts the Microsoft ScanDisk program which is a
[/Q:(value] [/S:(timeslice)][/U:(busytick)] [/C][/P][/T] disk analysis and repair tool used to check a drive
[d:][path][filename] [...] for errors and correct any problems that it finds. SUBST
(External)
Queues and prints data files. SELECT
(External) SUBST d: d:path
PROMPT SUBST d: /D
(Internal) SELECT [d:] [d:][path] [country code][keyboard
code] Substitutes a virtual drive letter for a path
PROMPT [prompt text] [options] designation.
Formats a disk and installs country-specific
information and keyboard codes (starting with DOS SWITCHES
(Internal) VOL 5. Pathname
(Internal)
SWITCHES= [/K][/F][/N][/W] A pathname (path) refers to the path you want DOS
VOL [d:] to follow in order to act on the DOS command. As
Used in the CONFIG.SYS file to configure DOS in a described in Chapter 3, it indicates the path from the
special way; for example, to tell DOS to emulate Displays a disk's volume label. current directory or subdirectory to the files that are
different hardware configurations. to be acted upon.

SYS 6. Filename
(External) VSAFE
(External) A filename is the name of a file stored on disk. As
SYS [source] d: described in Chapter 1, a filename can be of eight or
VSAFE [/option[+|-]...] [/NE][/NX][Ax|/Cx] [/N][/D][/U] fewer letters or other legal characters.
Transfers the operating system files to another disk.
VSAFE is a memory-resident program that 7. Filename Extension
continuously monitors your computer for viruses and
displays a warning when it finds one. A filename extension can follow the filename to
TIME further identify it. The extension follows a period and
(Internal) can be of three or fewer characters. A filename
extension is not required.
TIME hh:mm[:ss][.cc][A|P] XCOPY
(External) 8. Switches
Displays current time setting of system clock and
provides a way for you to reset the time. XCOPY [d:][path]filename [d:][path][filename] [/A][/D: Characters shown in a command syntax that are
(date)] [/E][/M][/P][/S][/V][/W][Y\-Y] represented by a letter or number and preceded by
Copies directories, subdirectories, and files. a forward slash (for example, "/P") are command
options (sometimes known as "switches"). Use of
TREE Syntax Notes these options activate special operations as part of a
(External) To be functional, each DOS command must be DOS command's functions.
entered in a particular way: this command entry
TREE [d:][path] [/A][/F] structure is known as the command's "syntax." The 9. Brackets
syntax "notation" is a way to reproduce the
Displays directory paths and (optionally) files in each command syntax in print. Items enclosed in square brackets are optional; in
subdirectory. other words, the command will work in its basic form
For example, you can determine the items that are without entering the information contained inside the
optional, by looking for information that is printed brackets.
inside square brackets. The notation [d:], for
TYPE example, indicates an optional drive designation. 10. Ellipses
(Internal) The command syntax, on the other hand, is how
YOU enter the command to make it work. Ellipses (...) indicate that an item in a command
TYPE [d:][path]filename Command Syntax Elements syntax can be repeated as many times as needed.
1. Command Name
Displays the contents of a file. 11. Vertical Bar
The DOS command name is the name you enter to
start the DOS program (a few of the DOS When items are separated by a vertical bar (|), it
UNDELETE commands can be entered using shortcut names). means that you enter one of the separated items.
(External) The DOS command name is always entered first. In For example: ON | OFF means that you can enter
this book, the command is usually printed in either ON or OFF, but not both.
UNDELETE [d:][path][filename] [/DT|/DS|/DOS] uppercase letters, but you can enter command
UNDELETE names as either lowercase or uppercase or a mix of
[/list|/all|/purge[d:]|/status|/load|/U|/S[d:]|/Td:[- both.
entries]]
2. Space
Restores files deleted with the DELETE command.
Always leave a space after the command name.

UNFORMAT 3. Drive Designation


(External)
The drive designation (abbreviated in this book as
UNFORMAT d: [/J][/L][/test][/partn][/P][/U] "d:") is an option for many DOS commands.
However, some commands are not related to disk
Used to undo the effects of formatting a disk. drives and therefore do not require a drive
designation. Whenever you enter a DOS command
VER that deals with disk drives and you are already
(Internal) working in the drive in question, you do not have to
enter the drive designator. For example, if you are
VER working in drive A (when the DOS prompt A> is
showing at the left side of the screen) and you want
Displays the DOS version number. to use the DIR command to display a directory listing
of that same drive, you do not have to enter the
drive designation. If you do not enter a drive
VERIFY designation, DOS always assumes you are referring
(Internal) to the drive you are currently working in (sometimes
called the "default" drive).
VERIFY on|off
4. A Colon
Turns on the verify mode; the program checks all
copying operations to assure that files are copied When referring to a drive in a DOS command, you
correctly. must always follow the drive designator with a colon
(:) (this is how DOS recognizes it as a drive
designation).

You might also like