You are on page 1of 10

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 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.

REN REN [drive:][path][filename1] [filename2] Renames a


file or
Command Syntax Description

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.

TREE TREE [drive:][path] Graphically


displays the
folder
Command Syntax Description

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.

Exits the MS-


DOS
EXIT EXIT command
prompt or a
batch file.

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.

DISKCOPY DISKCOPY [drive1:][path1][filename1] [drive2:] Copies the


[path2][filename2] contents of
Command Syntax Description

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.

BACKUP [destination] [/S] Backs up files


BACKUP and
directories.

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.

SYS SYS [drive1:][path] Transfers


Command Syntax Description

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.

Sets the MS-


DOS version
SETVER SETVER [drive:][path]filename [/B:bytes]
number for a
program.

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.

MORE MORE [filename] Display the


Command Syntax Description

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

ECHO [<message>] Specifies the


ECHO text to display
on the screen.

Displays or
sets a search
PATH PATH [[drive:][path] [;…]] path for
executable
files.

Sets or
displays
SET SET [variable=[string]]
environment
variables.

VOL [drive:] Displays a


VOL disk label and
serial number.

SUBST [drive1: [drive2:]path] Associates a


SUBST path with a
drive letter.

EDLIN EDLIN [drive:][path][filename] Edits text files.


Command Syntax Description

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

Starts the MS-


DOS-based
application for
QBASIC QBASIC [drive:][path] creating and
running
BASIC
programs.

Configures a
keyboard for a
KEYB KEYB [/CODEPAGE=page[,country]] [/E]
specific
language.

CHOICE CHOICE [/C:choices] [/N] [/S] [/T:c,nn] Provides a


Command Syntax Description

prompt with a
list of choices.

Compares the
contents of
DISKCOMP DISKCOMP [drive1:][drive2:]
two floppy
disks.

PRINT [/D:device] [filename] Sends a text


PRINT file to a
printer.

SORT [drive:][path][filename] Sorts the


SORT contents of a
text file.

Sets or
displays the
APPEND APPEND [[drive:]path[;…]]
search path
for data files.

ASSOC [.ext[=[fileType]]] Associates file


ASSOC extension with
a file type.

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.

FASTOPEN FASTOPEN [/X] [drive:] [path] [/R] Speeds up the


Command Syntax Description

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.

JOIN path [drive:] Joins a drive


JOIN letter and
directory path.

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.

CALL [drive:][path]filename [batch-parameters] Calls one


CALL batch 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.
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`.

You might also like