What Are MS-Dos Commands?
MS-DOS is a text-based system of Microsoft Operating System, The users interact with the
computer by typing text-based commands rather than a Graphical User Interface. These
commands allow users to perform various tasks, such as copying, deleting, or moving files, and
managing programs.
Why are MS-Dos Commands used?
File Management: MS-Dos commands enable users to navigate through directories and
create, delete, or copy files, enabling efficient file management.
System Configuration: Users can configure system settings, manage drives, and analyze
hardware issues using MS Dos commands, providing a robust toolkit for system
customization.
Program Execution: MS-Dos for commands facilitate the execution of programs and
scripts, offering a streamlined approach to launching applications without the need for
graphical interfaces.
List of MS-Dos Commands
Here's a table of some of the essential and commonly used commands MS-Dos for Commands
for quick reference:
Command Syntax Description
ges the current
CD CD [drive:][path]Change directory to the
specified folder.
Displays a list of files
DIR DIR [drive:][path] and subdirectories in a
directory.
Copies files from one
COPY COPY [source] [destination]
location to another.
Deletes one or more
DEL DEL [drive:][path]
files.
Renames a file or
REN REN [drive:][path][filename1] [filename2]
directory.
Creates a new
MKDIR MKDIR [drive:][path]
directory.
Removes an existing
RMDIR RMDIR [drive:][path]
directory.
filename Displays the
TYPE TYPE [drive:][path]
contents of a text file.
EDIT EDIT [drive:][path]filename Opens the MS-DOS
Command Syntax Description
text editor for editing a
specified file.
CHKDSK [volume:][[path]filename] [/F] [/V] [/R] [/X] Scans and fixes errors
CHKDSK
[/I] [/C] [/L[:size]] [/B] on a disk.
FORMAT Prepares a storage
FORMAT volume [/FS:file-system] [/V:label] [/Q]
medium for data
[/L[:size]] [/A:size] [/C] [/X]
storage.
Copies files and
XCOPY XCOPY [source] [destination] [/E] [/C] [/H] [/R] [/Y] directories, including
subdirectories.
Graphically displays
TREE TREE [drive:][path] the folder structure of a
drive or path.
Displays or sets the
DATE DATE [MM-DD-YYYY]
system date.
Displays or sets the
TIME TIME [HH: MM: SS]
system time.
Provides help
HELP HELP [command] information for MS-
DOS commands.
Exits the MS-DOS
EXIT EXIT command prompt or a
batch file.
Sets or clears file
attributes (Read-Only,
ATTRIB
ATTRIB [+ R|-R] [+A|-A] [+ H|-H] [+ S|-S] [d:] Archive, System,
[path]filename [/S] Hidden), managing file
visibility and access in
MS-DOS.
MODE [device] [BAUD=b] [PARITY=p] [DATA=d] Configures system
MODE
[STOP=s] devices.
DISKCOPY [drive1:][path1][filename1] [drive2:][path2] Copies the contents of
DISKCOPY
[filename2] one disk to another.
Displays the amount of
MEM[/program|/debug|/classify|/free|/module(name)]
MEM used and free memory
[/page]
in the system.
SCANDISK [/SURFACE] [/AUTOFIX] Scans and fixes disk
SCANDISK
[/CHECKONLY] errors.
UNDELETE UNDELETE [drive:][path][filename] Restores a deleted file.
Redirects requests for
ASSIGN ASSIGN [drive1:=[drive2:]] drive letters to a
different drive.
FDISK FDISK Manages disk
Command Syntax Description
partitions.
Backs up files and
BACKUP BACKUP [source] [destination] [/S]
directories.
Restores files and
RESTORE RESTORE [source] [destination] [/S] directories from a
backup.
Provides CD-ROM
MSCDEX MSCDEX [/D: driver /L:drive] [/M:bufsize] [/E /S /V]
access.
Transfers system files
SYS SYS [drive1:][path]
to a disk.
Installs file-sharing and
SHARE SHARE [/F:(space)] [/L:(locks)]
locking capabilities.
SMARTDRV SMARTDRV [size] [/E /V] [/C] [/L:size] Disk caching utility.
Sets the MS-DOS
SETVER SETVER [drive:][path]filename [/B:bytes] version number for a
program.
Disables automatic
ASSIGN ASSIGN [/D] drive-letter
assignments.
Provides a quick
FASTHELP FASTHELP [command] [command] /? overview of MS-DOS
commands.
Compares two files or
sets of files and
FC FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T]
displays the differences
between them.
FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:] Searches for a text
FIND
[path]filename[ ...]] string in files.
Display the content of a
MORE MORE [filename] text file one screen at a
time
This command can
ECHO either show or hide the
ECHO [on/off] text of the commands
you type. Command
echoing is on by default
Specifies the text to
ECHO ECHO [<message>]
display on the screen.
Displays or sets a
PATH PATH [[drive:][path] [;...]] search path for
executable files.
Sets or displays
SET SET [variable=[string]]
environment variables.
Command Syntax Description
Displays a disk label
VOL VOL [drive:]
and serial number.
Associates a path with
SUBST SUBST [drive1: [drive2:]path]
a drive letter.
EDLIN EDLIN [drive:][path][filename] Edits text files.
Starts the Debug
DEBUG
program for testing and
DEBUG [drive:][path][filename]
debugging assembly-
language programs.
Provides upper memory
block (UMB) and high
HIMEM.SYS HIMEM.SYS [/TESTMEM:off] [/HMAMIN=amount]
memory area (HMA)
support.
Restores a formatted
UNFORMAT UNFORMAT [drive:][path]
disk.
Enables output of
GRAPHICS [type] [[drive:][path]filename] [/R] [/B]
GRAPHICS graphical screen
[/LCD][/PRINTBOX:STD|/PRINTBOX:LCD]
content to print
Starts the MS-DOS-
based application for
QBASIC QBASIC [drive:][path]
creating and running
BASIC programs.
Configures a keyboard
KEYB KEYB [/CODEPAGE=page[,country]] [/E]
for a specific language.
Provides a prompt with
CHOICE CHOICE [/C:choices] [/N] [/S] [/T:c,nn]
a list of choices.
Compares the contents
DISKCOMP DISKCOMP [drive1:][drive2:]
of two floppy disks.
Sends a text file to a
PRINT PRINT [/D:device] [filename]
printer.
Sorts the contents of a
SORT SORT [drive:][path][filename]
text file.
Sets or displays the
APPEND APPEND [[drive:]path[;...]] search path for data
files.
Associates file
ASSOC ASSOC [.ext[=[fileType]]] extension with a file
type.
LABEL Creates, changes, or
LABEL [drive:][label] deletes the volume
label of a disk.
RECOVER RECOVER [drive:][path][filename] Recovers readable
information from a bad
Command Syntax Description
or defective disk.
Speeds up the opening
FASTOPEN FASTOPEN [/X] [drive:] [path] [/R]
of files.
Directs the command
GOTO GOTO <label> interpreter to a labeled
line in a batch program.
Shifts the position of
SHIFT SHIFT [/n <N>] batch parameters in a
batch file.
Joins a drive letter and
JOIN JOIN path [drive:]
directory path.
SMARTDRV [size] [buffers] [doublebuffer] [/E] [/C] Manages and optimizes
SMARTDRV
[/L] [/V] [/B] disk caching.
Executes the
BATCH BATCH [filename] commands specified in
a batch file.
Calls one batch
CALL CALL [drive:][path]filename [batch-parameters]
program from another.
Note: These commands are instructive and may differ slightly based on the different version of
MS-DOS . Always refer to the detailed documentation or use the command followed by /? for
detailed information on each command.
Conclusion
Mastering MS-DOS commands can significantly enhance your command-line skills, especially
if you work with older systems or require a deep understanding of operating system
fundamentals. This comprehensive list of MS-DOS commands covers everything from basic
MS-DOS commands to more advanced ones, ensuring you have the knowledge needed to
navigate the MS-DOS command line effectively. Use this guide as a go-to reference for all your
MS-DOS needs.