0% found this document useful (0 votes)
25 views8 pages

DOS Commands

This document provides a comprehensive list of essential MS-DOS commands along with their syntax and descriptions. It covers commands for file management, system configuration, and other utilities. The table serves as a quick reference guide for users familiar with MS-DOS.

Uploaded by

basharat.cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views8 pages

DOS Commands

This document provides a comprehensive list of essential MS-DOS commands along with their syntax and descriptions. It covers commands for file management, system configuration, and other utilities. The table serves as a quick reference guide for users familiar with MS-DOS.

Uploaded by

basharat.cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

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


COPY COPY [destination] one location to
another.

Deletes one or
DEL DEL [drive:][path]
more files.

Renames a file or
REN REN [drive:][path][filename1] [filename2]
directory.

Creates a new
MKDIR MKDIR [drive:][path]
directory.

Removes an
RMDIR RMDIR [drive:][path]
existing directory.

filename Displays
TYPE TYPE [drive:][path] the contents of a
text file.

EDIT EDIT [drive:][path]filename Opens the MS-


DOS text editor for
Command Syntax Description

editing a specified
file.

CHKDSK [volume:][[path]filename] [/F] [/V] [/R] [/X] [/I] Scans and fixes
CHKDSK
[/C] [/L[:size]] [/B] errors on a disk.

Prepares a storage
FORMAT volume [/FS:file-system] [/V:label] [/Q]
FORMAT medium for data
[/L[:size]] [/A:size] [/C] [/X]
storage.

Copies files and


directories,
XCOPY XCOPY [destination] [/E] [/C] [/H] [/R] [/Y]
including
subdirectories.

Graphically
displays the folder
TREE TREE [drive:][path]
structure of a drive
or path.

Displays or sets
DATE DATE [MM-DD-YYYY]
the system date.

Displays or sets
TIME TIME [HH: MM: SS]
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.
Command Syntax Description

Sets or clears file


attributes (Read-
Only, Archive,
ATTRIB [+ R|-R] [+A|-A] [+ H|-H] [+ S|-S] System, Hidden),
ATTRIB
[d:][path]filename [/S] managing file
visibility and
access in MS-
DOS.

MODE [device] [BAUD=b] [PARITY=p] [DATA=d] Configures system


MODE
[STOP=s] devices.

Copies the
DISKCOPY [drive1:][path1][filename1]
DISKCOPY contents of one
[drive2:][path2][filename2]
disk to another.

Displays the
MEM[/program|/debug|/classify|/free|/module(name)] amount of used
MEM
[/page] and free memory
in the system.

Scans and fixes


SCANDISK SCANDISK [/SURFACE] [/AUTOFIX] [/CHECKONLY]
disk errors.

Restores a deleted
UNDELETE UNDELETE [drive:][path][filename]
file.

Redirects requests
ASSIGN ASSIGN [drive1:=[drive2:]] for drive letters to
a different drive.

Manages disk
FDISK FDISK
partitions.
Command Syntax Description

Backs up files and


BACKUP BACKUP [destination] [/S]
directories.

Restores files and


RESTORE RESTORE [destination] [/S] directories from a
backup.

Provides CD-ROM
MSCDEX MSCDEX [/D: driver /L:drive] [/M:bufsize] [/E /S /V]
access.

Transfers system
SYS SYS [drive1:][path]
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


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

Disables
automatic drive-
ASSIGN ASSIGN [/D]
letter
assignments.

Provides a quick
FASTHELP FASTHELP [command] [command] /? overview of MS-
DOS commands.
Command Syntax Description

Compares two
files or sets of files
FC FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] and displays the
differences
between them.

FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] “string” Searches for a text
FIND
[[drive:][path]filename[ …]] string in files.

Display the
content of a text
MORE MORE [filename]
file one screen at a
time

This command
can either show or
hide the text of the
ECHO ECHO [on/off] commands you
type. Command
echoing is on by
default

Specifies the text


ECHO ECHO [<message>] to 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
VOL VOL [drive:] label and serial
number.

Associates a path
SUBST SUBST [drive1: [drive2:]path]
with a drive letter.

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

Starts the Debug


program for
testing and
DEBUG DEBUG [drive:][path][filename] debugging
assembly-
language
programs.

Provides upper
memory block
HIMEM.SYS HIMEM.SYS [/TESTMEM:off] [/HMAMIN=amount] (UMB) 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 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.
Command Syntax Description

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

Provides a prompt
CHOICE CHOICE [/C:choices] [/N] [/S] [/T:c,nn] with a list of
choices.

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

Sends a text file to


PRINT PRINT [/D:device] [filename]
a printer.

Sorts the contents


SORT SORT [drive:][path][filename]
of a text file.

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

Associates file
ASSOC ASSOC [.ext[=[fileType]]] extension with a
file type.

Creates, changes,
or deletes the
LABEL LABEL [drive:][label]
volume label of a
disk.

Recovers readable
information from a
RECOVER RECOVER [drive:][path][filename]
bad or defective
disk.
Command Syntax Description

Speeds up the
FASTOPEN FASTOPEN [/X] [drive:] [path] [/R]
opening of files.

Directs the
command
GOTO GOTO <label> interpreter to a
labeled line in a
batch program.

Shifts the position


of batch
SHIFT SHIFT [/n <N>]
parameters in a
batch file.

Joins a drive letter


JOIN JOIN path [drive:] and directory
path.

Manages and
SMARTDRV [size] [buffers] [doublebuffer] [/E] [/C] [/L]
SMARTDRV optimizes disk
[/V] [/B]
caching.

Executes the
commands
BATCH BATCH [filename]
specified in a
batch file.

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

You might also like