Ms Dos
Ms Dos
ges the
current
CD CD [drive:][path]Change directory to
the specified
folder.
Displays a list
of files and
DIR DIR [drive:][path]
subdirectories
in a directory.
Copies files
from one
COPY COPY [destination]
location to
another.
Deletes one or
DEL DEL [drive:][path]
more files.
directory.
Creates a new
MKDIR MKDIR [drive:][path]
directory.
Removes an
RMDIR RMDIR [drive:][path] existing
directory.
filename
Displays the
TYPE TYPE [drive:][path]
contents of a
text file.
Opens the
MS-DOS text
EDIT EDIT [drive:][path]filename editor for
editing a
specified file.
Scans and
CHKDSK [volume:][[path]filename] [/F] [/V] [/R] [/X]
CHKDSK fixes errors on
[/I] [/C] [/L[:size]] [/B]
a disk.
Prepares a
FORMAT FORMAT volume [/FS:file-system] [/V:label] [/Q] storage
[/L[:size]] [/A:size] [/C] [/X] medium for
data storage.
Copies files
and
XCOPY XCOPY [destination] [/E] [/C] [/H] [/R] [/Y] directories,
including
subdirectories.
structure of a
drive or path.
Displays or
DATE DATE [MM-DD-YYYY] sets the
system date.
Displays or
TIME TIME [HH: MM: SS] sets the
system time.
Provides help
information for
HELP HELP [command]
MS-DOS
commands.
Sets or clears
file attributes
(Read-Only,
Archive,
ATTRIB ATTRIB [+ R|-R] [+A|-A] [+ H|-H] [+ S|-S] [d:] System,
[path]filename [/S] Hidden),
managing file
visibility and
access in MS-
DOS.
Configures
MODE [device] [BAUD=b] [PARITY=p] [DATA=d]
MODE system
[STOP=s]
devices.
one disk to
another.
Displays the
amount of
MEM[/program|/debug|/classify|/free|/module(name)]
MEM used and free
[/page]
memory in the
system.
Scans and
SCANDISK [/SURFACE] [/AUTOFIX]
SCANDISK fixes disk
[/CHECKONLY]
errors.
Restores a
UNDELETE UNDELETE [drive:][path][filename]
deleted file.
Redirects
requests for
ASSIGN ASSIGN [drive1:=[drive2:]] drive letters to
a different
drive.
Manages disk
FDISK FDISK
partitions.
Restores files
and directories
RESTORE RESTORE [destination] [/S]
from a
backup.
Provides CD-
MSCDEX MSCDEX [/D: driver /L:drive] [/M:bufsize] [/E /S /V]
ROM access.
system files to
a disk.
Installs file-
sharing and
SHARE SHARE [/F:(space)] [/L:(locks)]
locking
capabilities.
Disk caching
SMARTDRV SMARTDRV [size] [/E /V] [/C] [/L:size]
utility.
Disables
automatic
ASSIGN ASSIGN [/D]
drive-letter
assignments.
Provides a
quick overview
FASTHELP FASTHELP [command] [command] /?
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.
Searches for a
FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] “string” [[drive:]
FIND text string in
[path]filename[ …]]
files.
content of a
text file one
screen at a
time
This command
can either
show or hide
ECHO the text of the
ECHO [on/off] commands
you type.
Command
echoing is on
by default
Displays or
sets a search
PATH PATH [[drive:][path] [;…]] path for
executable
files.
Sets or
displays
SET SET [variable=[string]]
environment
variables.
Starts the
Debug
program for
DEBUG testing and
DEBUG [drive:][path][filename]
debugging
assembly-
language
programs.
Provides
upper memory
block (UMB)
HIMEM.SYS HIMEM.SYS [/TESTMEM:off] [/HMAMIN=amount] and high
memory area
(HMA)
support.
Restores a
UNFORMAT UNFORMAT [drive:][path]
formatted disk.
Enables
output of
GRAPHICS [type] [[drive:][path]filename] [/R] [/B]
GRAPHICS graphical
[/LCD][/PRINTBOX:STD|/PRINTBOX:LCD]
screen content
to print
Configures a
keyboard for a
KEYB KEYB [/CODEPAGE=page[,country]] [/E]
specific
language.
prompt with a
list of choices.
Compares the
contents of
DISKCOMP DISKCOMP [drive1:][drive2:]
two floppy
disks.
Sets or
displays the
APPEND APPEND [[drive:]path[;…]]
search path
for data files.
Creates,
LABEL changes, or
LABEL [drive:][label] deletes the
volume label
of a disk.
Recovers
readable
RECOVER RECOVER [drive:][path][filename] information
from a bad or
defective disk.
opening of
files.
Directs the
command
interpreter to a
GOTO GOTO <label>
labeled line in
a batch
program.
Shifts the
position of
SHIFT SHIFT [/n <N>] batch
parameters in
a batch file.
Manages and
SMARTDRV [size] [buffers] [doublebuffer] [/E] [/C]
SMARTDRV optimizes disk
[/L] [/V] [/B]
caching.
Executes the
commands
BATCH BATCH [filename]
specified in a
batch file.
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.
Also Read
How to Install and Use Vim on DOSBox?
25 Basic Linux Commands For Beginners
SQL | DDL, DQL, DML, DCL and TCL Commands
FAQs on MS-Dos Commands
1. Are MS-Dos commands still relevant in modern computing?
Definitely! While graphical interfaces dominate, MS-Dos commands remain relevant
for specific tasks, especially in troubleshooting and automation.
2. Can I harm my computer using all MS-Dos commands?
Yes, some commands can cause data loss. It’s crucial to double-check your
commands before executing them to avoid unintended consequences.
3. Can all MS-Dos commands be used in all versions of Windows?
Yes, MS-Dos commands are supported in various versions of Windows, ensuring
compatibility across different systems.
4. Are MS-Dos commands case-sensitive?
No, MS-Dos commands are not case-sensitive, allowing users to input commands in
uppercase or lowercase letters.
5. What the is comp command in MS-DOS?
COMP compares two files byte by byte, highlighting differences. Options include /D
(decimal), /A (ASCII), and /L (line numbers).
Syntax: COMP [drive1:][path1][filename1] [drive2:][path2][filename2] [/D] [/A] [/L]
6. How many types of commands are there in MS-DOS?
There are two types of command in MS-Dos:
Internal Commands: These are built-in functions of Ms-DOS Operating System, It
can be used directly from cmd. Examples include `DIR`, `CD`, `CLS`, `TIME`, and
`DATE`.
External Commands: These commands are stored in separate executable files
(.exe) and require their own files to run. When you type an external command, MS-
DOS loads the corresponding program into memory. Examples include `FORMAT`,
`CHKDSK`, `DISKCOPY`, and `XCOPY`.