Dos Theory
Dos Theory
MS-DOS (Microsoft Disk Operating System), like any other operating system, manages the flow of
information to and from the various parts of the computer system.
DOS Functions
⇨ Maintain disks
⇨ Configure hardware
⇨ Optimize the use of memory
⇨ Customize MS-DOS
DOS Architecture
MS-DOS is partitioned into layers to isolate the logic of the operating system and the user perception of the
⇨ DOS Kernel
⇨ Command Processor (Shell)
BIOS (Basic Input Output System)
The BIOS is specific to the individual computer system and is provided by the manufacturer of the system. It
contains software to handle the devices such as Console display or Keyboard (CON), Printer (PRN), System
Clock etc. Most of these primitive BIOS functions are located in the ROM (Read Only Memory) so that they
can be used by other applications and the system start-up program.
DOS Kernel
The Kernel is a software supplied by Microsoft that provides a collection of hardware independent services
⇨ Memory management
⇨ Execution of system related programs
⇨ Character device input/output
Command Processor (Shell)
Shell is the user interface to the operating system. It processes and executes the user commands, including
loading and executing of other programs from the disk.
System Start-up | DOS Booting Process
When you switch on the computer, the system start-up program from ROM carries out the POST (Power-On
Self Test).
The BIOS is read into RAM during system initialization as a part of a file named IO.SYS.
The DOS kernel (MSDOS.SYS file),followed by the DOS shell (COMMAND.COM file) are then read into
memory from the secondary storage device (i.e. hard disk). This process is known as booting the system.
While booting the system the secondary storage device from where the IO.SYS kernel and shell are loaded is
referred to as the boot disk.
The first floppy drive in the system is generally referred to as the drive A, the second floppy drive as the drive
B, and the hard disk drive as the drive C.
Depending on the boot disk used, the system at the end of booting prompts the user by displaying either A>
or C> on the monitor.
When you get either A> or C>prompt, it indicates that the system is now ready to accept commands from the
user.
⇨ IO.SYS
To boot the system, your boot disk or boot diskette should have the following files:
⇨ MSDOS.SYS
⇨ COMMAND.COM
DOS Information Management
The information on your computer is stored in files. The instructions used to run a program are stored in
program files, and the information/data you create by using a program is stored in data files.
Directories and Subdirectories
A disk can hold several hundreds of files. Organizing files into directories and subdirectories on a disk is like
storing office files in drawers (directories) and its compartments (subdirectories) within a file cabinet (disk).
Generally, a directory would contain a group of related files.
If you have several reports like daily, weekly, monthly reports and expense statements like fixed expenses,
daily expenses, then you can create two subdirectories “REPORT” and EXPENSE.
The daily, weekly, monthly reports can then be stored in the “REPORT” subdirectory. The fixed, daily
expenses can be stored in the “EXPENSE” subdirectory.
Files
Each file in MS-DOS is uniquely identified by its name and its location. The location in turn has two
components, the logical drive that contains the file and the directory on the drive where the file name can be
found.
The ROOT Directory
Every disk has two kinds of directories the ROOT directory and OTHER subdirectories.
The ROOT directory is always present and subdirectories of ROOT directory can be created and nested to any
level. If a directory is created within a directory, then it is called a subdirectory. Therefore, except the ROOT
directory, all other directories are subdirectories.
The ROOT directory is denoted by a backslash (“\”).
All directories, except the ROOT, must be given a name.
A directory can contain files and/or subdirectories.
Current Drive/Directory
The current drive refers to the drive the user is currently working on. For example, A:, B:, C: etc.
Similarly, the current directory refers to the directory within which the user is currently working. For
example, “\”, “\DATABASE”, “\LOTUS\DATA” etc.
MS-DOS keeps track of the current drive, i.e. “A:” for the floppy disk or “C:” for the hard disk, and uses this
information as the default drive when file specifications do not include an explicit drive name. Similarly, MS-
DOS maintains a current directory for each logical drive.
The organization of the directories, the subdirectories, and the files is called the directory tree or the
directory structure.
Path
The string specifying the filename, its drive, and its directory is called as the path.
Absolute and Relative Path
You can refer to a particular file or directory on a drive by either Specifying its location relative to the ROOT
directory - ABSOLUTE PATH.
Or by specifying its location relative to the current directory - RELATIVE PATH
The Path is specified by giving the list of subdirectories separated by a backslash (\).
The Absolute Path always begins with the backslash (ROOT - \) building upto the desired file or subdirectory.
The Relative Path should NEVER begin with the backslash (ROOT - \).
Rules for Naming a File/Directory
A filename/directory consists of 2 parts: a primary name and an extension. The extension (secondary name)
is optional. The following rules need to be observed: The primary name should not exceed 8 characters in
length. The extension should not exceed 3 characters in length.
for example : filename.txt Special characters such as > < , . \ / * ? | ~ and spaces cannot be used as a part of
the filename or extension.
Different Types of DOS Commands
⇨ Internal Commands.
MS-DOS shell provides 3 categories of DOS commands
⇨ External Commands.
⇨ Batch Files or Command Files.
Internal Commands
The internal commands are directly executed from the RAM. These commands are part of the
“COMMAND.COM” file, which is loaded into the RAM at the time of booting. For example: VER, DIR, REN,
DEL, COPY etc.
External commands
The external commands are the names of the programs stored in the disk files. Before these programs can be
executed they must be loaded from the disk into the RAM. For example, CHKDSK, FORMAT, Scandisk etc.
Batch commands
Batch files are text files that contain a list of internal, external or batch commands which are executed in
sequence when the batch file is executed ( by typing in the name of the file). AUTOEXEC.BAT is a batch file
which gets executed automatically on booting. This file contains certain start-up instructions. All the batch
files will have an extension “.BAT”.
DOS Commands | Editing Controls
Several keys on the keyboard perform special tasks. MS-DOS uses some of these special keys for editing the
commands at the DOS prompt C:>.
Keys Function
F1 Retype one character at a time from the last command entry from the current cursor position.
F2 Retypes all characters from the last command entry up to the one identical to your next keystroke.
F3 Retypes all remaining characters from the last command entry.
Stores all characters beginning at the first match with your next Keystroke and ending with the last
F4
command entry.
BkSpace Erases character to the left of the cursor.
Places a special end-of-file code at the end of the currently open file; sometimes referred to as a
F6
CTRL-Z
Ins Permits insertion of characters at the cursor.
Del Permits deletion of the character to the left of the cursor.
Esc Abandon the currently constructed command and the next prompt appears.
If the user has used a “DIR” as his previous command and wants to repeat the “DIR” command, then the user
simply presses the F3 key for MS-DOS to automatically retype the DIR at the prompt.
If the user has keyed in COPY MYFILE.DAT A: and wants to repeat the COPY command, the user can press the
F1 key 5 times for MS-DOS to retype COPY at the prompt and then specify another file name and press
ENTER key.
DOS Commands | DIR
The DIR Command an Internal Command. This command displays a list of files and subdirectories within a
specific directory. Type the Command as follows and press Enter Key:
C:\>DIR
It displays:
creates a subdirectory having a name DATA in the \DATABASE directory of the C drive.
- If the directory name specified with MD already exists then DOS displays the following error message :
Directory already exists.
- If the path specified with MD is not valid then DOS displays the message :
Unable to create directory.
DOS Commands | CD or CHDIR Command for Change a Directory
This is an Internal Command. Displays the name of the current directory or changes the current directory.
C:\>CD
This will display the current directory
C:\>CD DATABASE\DATA
If the current directory is ROOT (\) this command will take you to \DATABASE\DATA directory and make it
the current directory.
- The above process can also be broken up into 2 commands
CD DATABASE- first changes to \DATABASE directory and makes it current CD DATA- then changes to \
DATABASE\DATA directory and makes it current.
CD with Absolute Path - Specify the complete path, when you want to change from anywhere in the directory
structure to any other directory
C:\>CD \DATABASE\DATA
Unlike the previous example, this command will change to \DATABASE\DATA directory irrespective of the
current position, and make it the current directory.
-Supposing the current directory is now \DATABASE\DATA, you can change to WINDOW\GAMES using the
following command :
C:\>CD \WINDOW\GAMES
here the path starts with the ROOT (\), so it is an absolute path.
- .. stands for the parent directory, CD .. will always take you to the parent directory of the current directory.
C:\DATABASE\DATA>CD ..
If the current directory at the time of issuing the above command was \DATABASE\DATA, then the current
directory will change to \DATABASE.
If the current directory at the time of issuing the above command was C:\ (ROOT), then DOS displays the
error message :
Invalid Directory. CD to Change the Drive
- For changing from one drive to another drive, type in the drive name followed by a colon (:)
C:\>D:
This command will remove the directory TAXES provided it is empty and your current directory is C:\ (ROOT).
RD with Absolute Path - You may specify the complete path to the directory to be removed.
C:\>RD \DATABASE\DATA
this command will remove the directory \DATABASE\DATA provided it is empty and your current directory is
NOT C:\DATABASE\DATA. If the current directory is C:\DATABASE\DATA, then DOS displays: Attempt to
remove current directory - C:\DATABASE\DATA. If the directory C:\DATABASE\DATA is not empty, then DOS
displays: Invalid path, not directory, or directory not empty.
DOS Commands | The DATE Command
This is an Internal Command. - To see or set the date, use:
C:\>DATE
DOS will display:
Current date is Sat 01-09-1993
Enter new date (mm-dd-yy):_
To change the date, you will have to type in the month-date-year. To retain the displayed date, just press
ENTER.
DOS Commands | The TIME Command
This is an Internal Command. - To see or set the time, use:
C:\>TIME
DOS will display:
Current time is 1:23:31p
Enter new time :_
To change the time, you will have to type in the hour:min:sec. To retain the displayed time, just press ENTER.
The hours have to be specified using the 24 hour format, i.e. 2pm will be specified as 14:00:00.
DOS Commands | The VOL Command
This is an Internal Command. This command displays volume label and serial number, if they exist. A serial
number is displayed for a disk formatted with MS-DOS version 4.0 or later.
C:\>VOL
This displays the volume and serial number of the disk in the current drive.
C:\>VOL D:
This displays the volume and serial number of the disk in drive D.
DOS Commands | The VER Command
This is an Internal Command. This command displays the MS-DOS version number.
C:\>VER
For the above command, MS-DOS will display the following message: MS-DOS Version 6.0
DOS Commands | The CLS Command
This is an Internal Command. - To clear the screen, use:
C:\>CLS
This will clear the screen and place the prompt in the top left hand corner of the screen.
DOS Commands | The PROMPT Command
Thi s is an Internal Command. - By default the prompt is always set to the name of current drive followed by
the > sign. To get the default prompt, use:
C:\>PROMPT
This will change the prompt to
C>
Customize the PROMPT - To customize the prompt to display any text, use
C:\>PROMPT MYPROMPT
This will change the prompt to MYPROMPT> PROMPT with options - To set the prompt to display the current
working directory, use
C>PROMPT $P$G
This will change the prompt to the current working directory. If your current working directory is \DATABASE,
then the new prompt will be C:\DATABASE> The $P in the above command signifies the current drive and
path, and $G signifies the > (greater than) symbol. - The other options used with PROMPT are, $Q for =
(equal sign) $$ for $ (dollar sign) $T for current time $D for current date $V for MS-DOS version number Any
combination of the above options can be used with the PROMPT.
DOS Commands |The FORMAT Command
This is an External Command. The FORMAT command creates a new ROOT directory and a File Allocation
Table (FAT) for the disk. It also checks for the bad areas on the disk and deletes all the data on the disk. In
order for MS-DOS to be able to use a new disk you must use this command to format the disk. - To format a
new floppy disk, use
C:\DOS>FORMAT A:
As FORMAT is an external command your current directory at the time of issuing the command should be the
directory containing the file FORMAT.COM or FORMAT.EXE. The formatted capacity of the disk will depend
on the type of the disk and the drive. FORMAT with /S Switch - When a disk is formatted with "/S" option the
disk can be used as a bootable disk.
C:\DOS>FORMAT A:/S
This copies the ~OS~ files required for booting the machine (IBMBIO.SYS, MSDOS.SYS and COMMAND.COM)
from your systems start-up drive to the newly formatted disk. This disk can now be used for booting the
machine.
DOS Commands | FORMAT Command for FORMAT a Hard Disk
- To format a hard disk, use
C:\>FORMAT D:
/S, /Q, /U switches can also be used while formatting the hard disk. WARNING : AS FORMAT DELETES ALL
EXISTING DATA, USE THIS COMMAND WITH EXTREME CAUTION !!! Any disk formatted (except with /U
switch) may be later unformatted using the UNFORMAT command. ***
DOS Commands | The BACKUP Command
This is an External Command. The BACKUP command backs up one or more files from one disk to another.
You can backup files onto either a hard disk or floppy disks. BACKUP source destination-drive - Source
specifies the location of files to be backed up. - Destination-drive specifies the drive on which you want to
store any backup files. The backed-up files are stored in the backup.nnn and control.nnn files, where nnn
represents the backup-disk number.
C:\DOS>BACKUP C:\TC A:
Will backup all files in the C:\TC subdirectory to the floppy disk(s). BACKUP with Switches - The /S switch can
be used to backup the contents of all files in the source (including the contents of its subdirectories).
C:\DOS>BACKUP C:\TC A: /S
will backup all files in the C:\TC subdirectory as well as all files in the subdirectories of C:\TC to the floppy
disk(s). - The /N switch can be used to backup only those files that have changed since the last backup.
C:\DOS>BACKUP C:\TC A: /N
- The /D:date switch can be used to backup only those files that have changed on or after the specified date
C:\DOS>BACKUP C:\TC A: /D:01-10-2022
will backup all files in the C:\TC subdirectory that have changed since the date 01-12-1992. *******
DOS Commands | The RESTORE Command
This is an External Command. The RESTORE command restores files that were backed up by using the
BACKUP command. RESTORE drive1 drive2:path - drive1 specifies the drive on which the backed up files are
stored. - drive2:path specifies the path to which the backed up files will be restored.
C:\DOS>RESTORE A: C:\TC\*.*
will restore all the previously backed up files from the floppy disk(s) to the subdirectory C:\TC - The /S switch
can be used to restore all the backed up files to their original directories and the subdirectories.
C:\DOS>RESTORE A: C:\TC\*.* /S
will restore all backed up files to their original directories and subdirectories (from where they were backed
up). *********
DOS Commands | The DISKCOPY Command
This is an External Command. This command copies the contents of one floppy disk from the source drive to
a formatted or unformatted floppy disk in the destination drive. This command copies the data from a
particular position on the source disk to exactly the same position on the destination disk.
C:\DOS>DISKCOPY A: B:
will copy the contents of the disk in drive A to the disk in drive B. If only a single drive is present then the
source and the destination drives can be the same. /V switch can be used to verify that the disk is copied
correctly.
C:\DOS>DISKCOPY A: B:/V
****
DOS Commands | The DISKCOMP Command
This is an External Command. This command performs a track by track comparison of 2 floppy disks.
C:\DOS>DISKCOMP A: B:
will compare the disk in the drive A with the disk in the drive B. If the disks being compared are the same
then the message "compare OK" is displayed. If not MS-DOS reports an error message Compare error on
**********
DOS Commands | PRINT Command for Print a File
This is an External Command. This command prints a text file(s) while you are using the other MS- DOS
commands. Since the speed of the printer is slow the file(s) that are to be printed can be sent to a queue. On
using the PRINT command one file at a time is taken from the queue on a "first come first serve" basis and is
printed. The printing process is on as a BACKGROUND process i.e. the computer can simultaneously be used
to carry out other activities in the FOREGROUND.
C:\>PRINT
will install the resident part of the print routine in the memory, display the list of files in the queue and the
present status.
C:\>PRINT MYFILE
will send the file by name MYFILE to the queue which will be printed once the printer is free. PRINT with
Switches
C:\>PRINT /Q:N
sets the maximum queue length to N number of files.
C:\>PRINT /T
removes all the files from the print queue. *******
DOS Commands | CHKDSK Command for Check a HardDisk
This is an External Command. Displays the status report for a disk, with the following details: The total disk
space Number of bytes occupied by the hidden files Number of bytes occupied by the subdirectories Number
of bytes occupied by the user files Number of bytes in bad sectors Number of bytes in each allocation unit
(Cluster) Total allocation units on the disk The number of free allocation units Total bytes in the main
memory (RAM) Number of bytes free on RAM
C:\>CHKDSK C:
will check and display the status of the hard disk. If the drive is not specified the current drive is assumed.
C:\>CHKDSK D:/V
will display the name of each file in every directory as the disk is checked. CHKDSK with /F Switch - To fix the
errors on the disk, use /F switch:
C:\DOS>CHKDSK D:/F
This prompts with a confirmation message similar to the following: 10 lost allocation units found in 3 chains
Convert lost chains to files?_ If you press Y, MS-DOS saves each lost chain as a file in the ROOT directory with
the file name FILEnnn.CHK. If you press N, MS-DOS fixes errors on the disk but does not save the contents of
the lost allocation units. ***
DOS Commands | The TREE Command
This is an External Command. Graphically displays the directory structure of the path or of the in a drive.
C:\WINDOWS>TREE
will display the directory structure for the current directory.
C:\>TREE \
will display the directory structure for the entire disk as the path specified in this case is the ROOT(\) of the
current drive.
C:\DOS>TREE D:
will display the directory structure of the default directory of the floppy drive A./
C:\DOS>TREE C:\USERS /F
will display the directory structure of the @\TC@ subdirectory alongwith the names of files in each
subdirectory within \TC *******
DOS Commands | The LABEL Command
This is an External Command. The LABEL command creates, changes or deletes the volume label (name) of a
disk. - To label a floppy with DOSCBT as its name use: C:\DOS>LABEL A:DOSCBT This will label the floppy disk
in drive A as DOSCBT.
C:\DOS>LABEL A:
This command will display the following message Volume in drive A is xxxxx Volume Serial Number is xxxx-
xxxx Volume label (11 characters, ENTER for none)? If only ENTER is pressed and the label for the floppy
already exists then MS-DOS prompts you with Delete current volume label (Y/N)? Pressing Y at this prompt
will delete the existing label. *******
DOS Commands | The UNFORMAT Command
This is an External Command. The UNFORMAT command restores a disk erased by the FORMAT command. -
To unformat a floppy formatted (without the /U option), use
C:\DOS>UNFORMAT A:
DOS Commands | The UNDELETE Command
This is an External Command. The UNDELETE command restores the files previously deleted with the DEL
command. When a file is deleted, DOS overwrites the first character of the file name by a special character
and releases all the space occupied by that file. Undelete can work successfully only if this space which was
released has not been overwritten by some other file. The following command specifies that UNDELETE is to
recover all deleted files in the specified directory, one at a time and to prompt for confirmation on each file.
C:\DOS>UNDELETE A:
After confirmation this command will prompt for the first character of the file name.
DOS Commands | HELP Command
For a brief explanation and the syntax summary of any command use a /? with the command.
C:\DOS>TYPE /?
will display the help screen for the @TYPE@ command. - Similarly, for other commands,
C:\DOS>COPY /?
C:\DOS>REN /?
C:\DOS>DIR /?
For a brief explanation of the commands (internal, external and batch) use the HELP command.
C:\DOS>HELP
- Similarly, for a brief explanation of any command use, C:\DOS>HELP MD
PDF Downlaod DOS Commands | An Overview
Types of DOS Commands
The command processor or command interpreter is contained in the command.com program. This essential
program displays our system prompt and the command line interface. The entire set of commands available
in DOS is divided into two types
Internal commands
Internal commands are the simplest memory resident commands, most commonly used commands and
execute immediately because they are a part of a file named COMMAND.COM. When we list the files of our
directory the internal commands are not seen. Once DOS is loaded, there is no need for the DOS Diskette in a
drive to use these commands. E.g. DIR, COPY, MOVE etc. If we execute internal command, the command
processor executes the command itself.
External commands
They are separate utility programs or files stored in DOS directory. Any filename with an extension
of .COM, .EXE or .BAT is considered as an external command. They are faster than internal commands
because they do not look for the COMMAND.COM file and are executed directly. E.g. CHKDSK, FORMAT,
SCANDISK etc. It does not execute the command itself but transfers the control to the appropriate program.
The programs are loaded into the memory when they are specifically asked for.
MS-DOS Commands [Everything You Need to Know]
Introduction
MS-DOS commands are used to interact with the operating system and other line-based commands
software, but many users have moved away from using MS-DOS, opting for the Windows command line
instead.
You can use MS-DOS commands such as DIR to list all files and subdirectories in a directory, CD to change the
current directory, MD to create a new directory, RD to remove a directory, and DEL to delete a file. You can
also use COPY to copy a file from one location to another, MOVE to move a file from one location to another,
and REN to rename a file. Additionally, you can use TYPE to display the contents of a file, DATE to display or
set the current date, and TIME to display or set the current time. These commands can help you manage
your files and directories, and perform various operations on your PC.
Here are the MS-DOS commands and their description in one paragraph:
Date Command: This command is used to change or display the current system date.
TIME Command: The Command is used to change or display the current system time.
VOL Command: This Command displays the disk volume level or serial number.
LABEL Command: This command can create, update and delete the serial number of a particular disk.
ECHO Command: The `message` command is used to display messages on the command screen and control
command-echoing. It can be used to display messages to the user, and also to turn on or off the echoing of
commands.
PROMPT Command: This Command is used in changing the command prompt.
TITLE Command: This Command can change the title of the MS-DOS screen.
MKDIR/MD Command: MKDIR/MD command creates the directory in a particular drive.
CHDIR/CD Command: CHDIR/CD command is used to change the current working directory.
CD.. and CD\ Command:
The Command is used to exit from the current working directory.
The CD\ command is used to change the directory on a Windows system. When used with a backslash (\)
followed by a drive letter (e.
COPY CON: COPY CON command is used to create a text file.
TYPE Command: The TYPE command is used to display the file.
EDIT Command: The EDIT command opens the DOS Editor, a text editor, to create, view, and edit files.
DIR Command: The DIR command is used to display a list of files and subdirectories in a directory.
TREE Command: This Command displays files and subdirectories of a particular directory.
DEL/ERASE Command: The DEL/ERASE command is used to delete one or more files at the same time.
RM/RMDIR Command: This Command is used to remove (delete) a directory (folder).
SHUTDOWN Command: The shutdown command is used to shuts down the Window.
DOS Commands
The MS-DOS commands can also be classified as per their use and the commands are
Directory commands
DIR, MD or MKDIR, RD, TREE & PATH
File Management commands
COPY, XCOPY, DEL, RENAME & ATTRIB
General commands
TYPE, DATE, TIME & PROMPT
Disk Management commands
FORMAT, CHKDSK, LABEL, VOL
DOS utility commands
MOVE, DELTREE, SCANDISK & SETVER
DATE
This command (internal) permits us to enter or change the date known to the system. Whenever we create
or add to a file, the date is recorded in the directory. Its syntax is
DATE [mm/dd/yy]
TIME
This command (internal) permits us to enter or change the time known to the system. Whenever we create
or add to a file, the time is recorded in the directory. Its syntax is
TIME [hh:mm:[ss[.xx]]]
CLS
This command clears the terminal screen. Its syntax is CLS
VOL
This command displays the disk volume label or volume ID of the specific drive, if it exists. Its syntax is
VOL [drive:]
If we don’t specify a drive letter, MS-DOS displays the volume label or the disk in the default drive. To display
the volume label of drive C
C>VOL C:
Volume in drive C has no label Volume serial number is 1106-16DF
DIR
This command lists the files and the sub directories in a directory except the hidden system files such as
MSDOS.SYS and IO.SYS, even if present, its usage is
DIR [drive:][path][filename] [/P] [/W][:] [/O[[:]sort order]] [/S] or DIR [C:][filename.[ext]Where,
[drive:][path][filename] – Specifies drive, directory, and/or files to list.
/P – This command lists the directory page wise and pauses after each screen of information.
/W – This command lists the directory width wise and Uses wide list format.
/O – List by files in sorted order and the sort order is given as
N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date & time (earliest first)
/S – Displays files in specified directory and all subdirectories.
The information provided in the directory listing includes the volume identification and the amount of free
space on the disk. The display line in the each file includes its size in decimal bytes and the date and time the
file was last written to. If the directory contains more files than will fit on one screen, /p and /w can be
combined as
DIR [C:][filename.[ext][/p][/w]
Global characters: “?” and “*” are known as global characters. These characters are used in the file name and
extension parameters. (A “?” mark in the filename or filename extension means that any character can
occupy that position or any of the remaining position in the filename or extension
To display all the files having extension .BAK of drive C type
C>DIR *.BAK
COPY
Copies one or more files to another location, its usage is
COPY source [+ source [+…]] [destination [/V] [/Y | /-Y]Where,
Source – Specifies the file or files to be copied.
Destination – Specifies the directory and/or filename for the new file(s).
/Y – Suppresses prompting to confirm we want to overwrite an existing destination file.
/-Y – Causes prompting to confirm we want to overwrite an existing destination file.
To append files, specify a single file for destination, but multiple files for source (using wildcards or
file1+file2+file3 format). For e.g.
COPY ABC.IMP B:
If the original file is on the default drive and we don’t specify the second pathname, the copy
command is not performed and MS-DOS displays the following message:
File cannot be copied onto itself: 0 file(s) copied.
If the second option is a filename only, MS-DOS copies the original file to one on the default drive
and renames it with the specified filename. E.g. C>COPY VIP.IMP VVV.IMP
We can use the global characters? And * in the file name and in the extension of both the sources and the
target files. E.g.
A>COPY *.* B:
Copies all type of files in the current directory from the default drive A to B.
REN (RENAME)
Renames a file/directory or files/directories, its usage is
RENAME [drive:][path][directoryname1 | filename1] [directoryname2 | filename2]
Note that we cannot specify a new drive or path for our destination.
A>REN B: MAIN.PRG TIME.PRG
Renames the file MAIN.PRG on drive B to TIME.PRG
DEL (DELETE)
This command deletes the files specified by the drive and path name. Its syntax is
DEL [drive:][path] filename [/P] –OR- ERASE [drive:][path]filename [/P] [drive:][path]filename – Specifies the
file(s) to delete. Specify multiple files by using wildcards.
/P – Prompts for confirmation before deleting each file. A message “Are we sure (Y/N)?” is displayed to
verify that we actually want to delete the file. Type Y (Yes) if we want to delete otherwise type N (No).
If we do not specify the drive name the current working drive is assumed i.e. the files will be deleted from
the current working directory.
A> del C:\temp
We can’t delete files that are marked as read only. Don’t use DEL command to delete a sub-directory. We can
use the global filename characters ‘?’ and ‘*’ in the filename and extension e.g.
B> DEL *.BAK
TYPE
This command displays the contents of a text file on the screen. Its usage is
TYPE [C:] filename [.ext] –OR- TYPE [drive:][path]filename
Using this command we can view text without modifying it. We can redirect the output to a file or the printer
e.g. the following command prints the contents of the file JAY.COB to the printer.
C>TYPE JAY.COB >PRN or DIR>PRN
If we want to redirect the output top a file, use filename instead of PRN. Global filename characters are not
allowed in the filename or extension. If we try to display a binary file, we may see strange characters on to
screen, including bells, form feeds etc.
MKDIR
This command creates a subdirectory in the specified disk. Its usage is
MKDIR [C:] path Or MD [C:] path –OR- MKDIR [drive:]path –OR- MD [drive:]path
If we omit the drive letter of the disk, the default (current) drive is assumed.
Path specifies the path of subdirectory names, i.e. when we create directories with MKDIR, they always
appear under our working directory unless we specify a different path with the MKDIR command. All
characters, that are valid for file name, are valid for a directory name. For e.g.
MD\WS
Will create a subdirectory namely WS under the root directory of drive A. the following command creates the
subdirectory PRG under the subdirectory WS.
A>MD\WS\PRG
If the current directory is WS the following command creates the subdirectory PRG under the subdirectory
WS. We can create as many subdirectories as we wish, limited only by available disk space. But be sure that
the maximum length of any single path from the root directory to the desired level is no more than 63
characters, including embedded backslashes. Two or more files or directory can have the same name as long
as they are defined in separate directories.
CHDIR or CD
This command changes the DOS current directory. Its syntax is
CHDIR [C:] [path] –OR- CD [C:] [path] [C:] – specifies the disk drive whose current we want to change or
display. If we don’t specify a
drive the default drive is assumed.
C>CD\
This command changes the current directory of the default drive to its root directory.
C>CD..
This puts us in parent directory of our working directory. If our working directory is C:\DOS\BASIC and we
want to change our path to another directory such as C:\DOS\PCTOOLS type the following command and
press enter
C>CD\DOS\PCTOOLS
RMDIR or RD
This command removes a sub-directory from the specified disk. Its usage is
RMDIR [C: [[path] –OR- RD [drive:]path
With the exception of “.” And “.” entries, the directory we want to remove must be empty i.e. before
removing a directory that contains hidden files and sub-directory. The root directory, the working directory
or the directory that contains hidden files can’t be removed. Suppose we want to remove a directory named
C:\DOS\TEMP, first ensure that the directory is empty and then type the following command.
RD C:\DOS\TEMP
The last directory name in the path is the directory (i.e. TEMP) is removed.
FORMAT
This command formats the disk to the specified disk. Formatting analyses the entire disk for any defective
tracks; and prepare the disk accept MS DOS files by initializing the directory, File Allocation Table, and system
loader. We must use this command to format all new disks before MS can use them. Be careful before
formatting any disk, particularly a fixed disk because formatting destroys all data on the disk. Its usage is
FORMAT drive: [/V[:label]] [/Q] [/4] [ /S]
/4 – Format a single sided or double-sided diskette in a high capacity disk drive. (1.2MB)
/Q – Performs a quick format.
/S – To copy the operating system files MSDOS.SYS, IO.SYS, COMMAND .COM
The first two files are hidden files, so we can’t see these two files in a directory of formatted disks. If the
operating system is not on the default drive, format prompts to insert a system disk in the default drive or in
drive A. If the default drive is non-removable, a message system transferred is displayed if the operating
system files are successively copied onto the disks we are formatting. /V prompts for a volume label after the
disks is formatted as
Enter volume label (11 characters, enter for none)?
A volume label identifies and can be up to 11 characters in length. The volume label cannot be used in place
of file names as input to any of the DOS commands.
LABEL
This command (external) creates, changes or deletes the volume identification label on a disk. Its syntax is
[C:] [path] LABEL [C:] [volume label]
To create a volume label type the following command
LABEL b: PURCHASE 89 or we can type LABEL B:
Then we are prompted
Volume in drive B has no label
Volume Label (11 characters, Enter, for none)?
Type PURCHASE 89 and press enter.
MORE
This is an external command that reads data from the standard input device, sends one screen of data to the
standard input device, sends one screen of data to the standard output device and then pauses with the
message
—MORE—
Its usage is
[C:] [path] MORE [C:] [path] before MORE specifies the drive specifies and path contains the MORE command
file. The MORE command will not work if the disk is full or write protected because to hold input information
until it is displayed, the MORE command creates a temporary file on the disk. This command is useful for
viewing long files, e.g. the following command displays the contents of the LONG.COB on the screen at a
time.
TYPE ONG.COB|MORE
If screen is full, the message “—MORE— Press any key to see the next screen” appears.
TREE
This external command displays all the directory paths found on the specified drive and optionally lists the
files in the root directory and each sub directory. Its syntax is
[C:] [path] TREE [C:] Also TREE D:/f
PATH
This command (internal) search specified directories for command or batch files that were not found by a
search of a current directory. PATH only finds files that can be executed; such as .COM, .EXE and .BAT files, it
won’t find files with any other extension. Its syntax is
[C:] [drive][path] [:drive] [path]…] or PATH;
We may specify a list of drives and path names separated by semicolons so that when we enter a command
that is not found in the current directory of the drive that was specified with the command, MS-DOS
searches the named directories in the sequence we entered them. Note that the current directory is not
changed.
To display the current path, type PATH without any parameter. To reset the search path to null (no extended
search path), type PATH followed by a semicolon. This is the default when DOS is started.
C>PATH C: DOS
CHKDSK
The CHKDSK command checks a disk’s formatted size and available memory space. It also indicates the
amount of disk space consumed by system files, data files, and bad sectors. DOS 5 also reports the volume
serial number and information about the disks allocation units (clusters).
[C: Path] CHKDSK [File Spec][/F]
C: Path is the drive and path where the command file is located if it is not in the current directory or in a
directory on the search path.
File Spec is an optional drive and path, including the filename and extension, of the file that is the object of
the command. Wild cards are allowed.
/F allows us to make actual corrections on the disk.
PROMPT
The PROMPT command changes the systems prompt to whatever we like. It is useful for finding out which
directory we are in, before we modify or delete any file. It can display the time, the date or a single message.
Its syntax is
PROMPT string
String includes any sequence of normal ASCII characters and any number of $x special purpose entries.
Possible values for $x are shown below
Symbol Meaning
$p Current directory of the default drive
$g the > redirection character (greater than)
$d system date
$t system time
$v Version number
$b the | (pipe) character (The vertical bar)
$q The = character
ATTRIB
This command can display or change file attributes. Each file has got some attributes, according to which
commands are applicable to it. For example a file having enabled hidden attribute cannot be seen with DIR
command. Its syntax is
ATTRIB [+R | -R] [+S | -S] [+H | -H] [[drive:][path]filename]
Where,
+ Sets an attribute, – Clears an attribute, R Read-only file attribute, S System file attribute, H Hidden
file attribute.
XCOPY
This command copies files and directory trees to another location. Its syntax is
XCOPY source [destination] [/P] [/S [/E]] [/W]
Source Specifies the file(s) to copy.
Destination Specifies the location and/or name of new files.
/P Prompts us before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
/W Prompts us to press a key before copying.
DELTREE
It deletes a directory and all the subdirectories and files in it. Its syntax is
DELTREE [/Y] [drive:]path [[drive:]path[…]]
Where,
/Y Suppresses prompting to confirm we want to delete the subdirectory.
[drive:]path Specifies the name of the directory we want to delete.
Note: Use DELTREE cautiously. Every file and subdirectory within the specified directory will be deleted.
MOVE
This command is utilized for moving files and renames files and directories.
To move one or more files
MOVE [/Y | /-Y] [drive:][path]filename1[,…] destination
To rename a directory
MOVE [drive:][path]dirname1 dirname2
[drive:][path]filename1 Specifies the location and name of the file or files we want to move.
Destination Specifies the new location of the file. Destination
[drive:][path]dirname1 Specifies the directory we want to rename.
dirname2 Specifies the new name of the directory.
CLS COMMAND
This is an Internal dos command which is used to clear the output on the screen obtained when executing
any basic dos commands.
These commands clear all the text from the screen and show the user a Command prompt.
(Syntax)
C:\>cls (Press Enter)
DATE COMMAND
The date command is an internal basic dos command which is used to display or change the current date
of the system in the format of mm/dd/yy.
(Syntax)
C:\>date (Press Enter)
TIME COMMAND
The time command is used to display or change the current time of the Computer system.
The format which is used by the time command is HH:MM: SS::CC. Where HH stands for hours of the day
in 24-hour format, MM for minutes, SS For seconds, and CC For hundreds of a second.
(Syntax)
C:\> Time (Press Enter)
COPY CON COMMAND
This is a very important internal dos command which is used to create text files.
The filename used while creating a file using this basic dos command consists of a primary name and an
extension which is separated by a dot or commonly called a period.
While creating a File there are some rules, a primary file name must not be greater than 8 characters and
the extension must be not greater than 3 characters.
The filename can consist of digits and special symbols such as 0 to 9 or @ # % etc.
(Syntax)
C:\>copy con abc.com (Press Enter)
Everybody wants to go to heaven but nobody wants to die.
To save the file use CTRL+Z OR F6 OR to cancel use CTRL+C from the keyboard.
TYPE COMMAND
Type command is used to view the content of the file.
(Syntax)
C:\>type abc.com (Press Enter)
Everybody wants to go to heaven but nobody wants to die.
If the content of the file is large and cannot be entirely viewed on the display device use the following MS-
Dos command.
(Syntax)
C:\> type abc.com |more (Press Enter)
RENAME COMMAND
This Basic Dos Command is used for renaming an existing file or directory.
(Syntax)
C:\>Ren (old file name) (new file name) (Press Enter)
For Example, you have a file name abc.com and want to change the file name to computer.xyz.
Use the below command.
C:\>Ren abc.com computer.xyx(Press Enter)
Ok now if you need to change the name and extension of files in a group.you need to use wildcards as
given below
C:\>Ren *.com *.abc (Press Enter)
Here all the .com extension files will be renamed to .abc
COPY
Copy is a Basic internal dos command which is used to copy files from one location to another.
While using copy command you have to specify the path or address of the file and the location where you
need to copy that file.
Do not forget to mention the address of the file and the destination where you need to copy it.
(Syntax)
C:\> Copy d:\abc.com E: (Press Enter)
Using wild cards you can copy each and every file present in a directory for example if you need to copy
files that are present in d:\songs to e:\newsongs use the following command.
C:\Copy D:\songs\*.* E:\newsongs (Press Enter)
You can use the switches present in the copy command to know the various switches using the below-
mentioned MS-Dos command.
C:\>copy/? (Press Enter)
The Various Switches are
Source:: specifies the file and files to be copied
• /A:: Indicates an ASCII text file
• /B:: Indicates a Binary file Destination:: Specifies the directory and /or filename for the new file.
• /V:: Verifies that new files are written correctly
• /Y:: Suppresses prompting to confirm you want to overwrite an existing destination file.
• /-Y:: Causes prompting to confirm you want to overwrite an existing destination file.
DELETE
Del is a Basic internal dos command which is used to delete the specifically mentioned files.
(Syntax)
C:\del abc.com (Press Enter)
To delete files in a group use wild cards.
C:\>del * .abc (Press Enter)
In the above command, all the files which have an extension .abc will be deleted.
DIR COMMAND
DIR Command Is used to display all the files and directories along with the filename, extension, creation
date, and modified date.
(Syntax)
C:\>Dir (Press Enter)
Switches Used in DIR Command
• /P:: uses to display the result in page-wise format c:\dir/p
• /W:: It Displays the result in widthwise format c:\dir/w
• /A:: is used to display files or directories with specific Attributes
• /O:: It is used to display a list in sorted order
• /L:: Displays result in lowercase
• /B:: Displays result in bare format
• /S:: Displays all files in the computer system Combination Switches
• Dir/AH:: Displays all files and directories which are hidden in the computer system
• Dir/A-H:: Displays all hidden files and directories
• Dir/AS:: Displays all system files
• Dir/A-S:: Displays all files which are not system files
• Dir/AR:: for all read-only files
• Dir/A-R:: for all files except read-only
• Dir/AA:: for displaying all archive files present in the computer system
• Dir/A-A:: All files except archive files
• Dir/AD:: Displays all directories present in the computer system
• Dir/A-D:: Displays are files except for Directories
• Dir/O:: Displays in sorted order directories first and then files
• Dir/ON:: Displays result in alphabetic order
• Dir/OE:: Displays list in Ascending Order
• Dir/O-E:: Displays list in Descending order
• Dir/OD:: List is Displayed in date, time and smallest first
• Dir/O-D:: List is Displayed in date, time and largest first
• Dir/OS:: List is Displayed by size Smallest first
• Dir/O-S:: List is Displayed by size Largest First
MD COMMAND
MD or MKDIR command is an internal dos command which is used to create directories and
subdirectories.
(Syntax)
C:\>md (directory name) (Press Enter)
For example, if you need to create a directory named movies follow the below dos command.
C:\> MD movies (Press Enter)
CD OR CHANGE DIRECTORY COMMAND::
CD OR CHDIR is an internal dos command which is used to create a subdirectory or to enter within a
parent directory.
(Syntax)
C:\>cd movies (Press Enter)
Here in the above example, we can enter into a parent directory named movies by using CD Command.
CD.. COMMAND
CD.. command is used to change the directory from parent to child.
For Example::
C:\movies>cd.. (Press Enter)
C:\>
CD\ COMMAND::
CD\ COMMAND is used to change the path from the current directory to the root directory.
REMOVE DIRECTORY COMMAND::
It is used to remove or erase an empty subdirectory.
(Syntax)
C:\>RD movies (Press Enter)
To use the following command you should see that the subdirectory should not contain any files or
subdirectories.
VERSION OR VER COMMAND
The Version or Ver command is used to display the version of your operating system.
(Syntax)
C:\> Ver (Press Enter)
VOLUME COMMAND
VOLUME COMMAND is another Basic internal dos command which is used to display the information of
your current drive.
(Syntax)
C:\>Vol (Press Enter)
You May Also Like
• Microsoft Disk Operating System
• Computer Basic Tutorials
Basic External Dos Commands & Uses
External Dos Commands are those commands which are not embedded into the command.com file, this
command requires external supporting files for execution.
For example, to run the fdisk command you will need a fdisk.exe or fdisk.com file inside your computer
system or bootable drives.
# External Dos Commands Uses
1 FORMAT Format Hard Disk Drive | Floppy Disk
2 DISKCOPY Copy Data and Information from one location to another
3 XCOPY Copy files and directories
4 SYS Create bootable disk
5 CHECKDISK [CHKDSK] Check the hard disk drive for errors.
6 DOSKEY Remember the last used commands.
7 EDIT edit the content of the file.
8 ATTRIB Can make a file read-only, hidden, achieve, system
9 MODE change the resolutions of the screen.
10 DELTREE delete directories
11 LABEL change the name of the hard disk.
12 SCANDISK check the hard disk for issues.
FORMAT COMMAND
Format command is an external command and to run the format command you need a supporting file
named format.com.
The format command deletes or erases all the data present in the drives.
which can be any flash drive, hard drive, or floppy disk.
The format command creates a new allocation table and root directory and makes the drive usable.
The command also checks for bad areas of drives commonly called bad sectors.
(Syntax)
C:\> format (drive name) (Press Enter)
C:\>format A: (Press Enter)
Switches are used in the format command.
• /Q:: is used for quick formatting of hard drives
• /U:: is used for unconditional format
• /S:: is used to transfer system files to the destination drive, and hence the destination drives become
bootable or startup.
DISKCOPY COMMAND
DISKCOPY is a basic dos command which comes in a category of external dos command which is used to
copy the entire content of one drive to another.
The disk copy command works only with a floppy disk.
(Syntax)
C:\>Diskcopy A: B: (Press Enter)
XCOPY COMMAND
XCOPY DOS COMMAND is used to copy entire files, directories, and subdirectories from one location to
another.
The Xcopy command is executed when the xcopy.exe file is present on a hard disk or a bootable drive.
(Syntax)
C:\>xcopy (source) (destination) (Press Enter)
C:\>xcopy/s/e c:\movies d:\new (Press Enter)
In the above example, xcopy will copy all files and directories from c:\movies to d:\new .where /s is used
for copying nonempty subdirectories.
And /e is used for copying directories and subdirectories including empty ones. Switches used in XCOPY
COMMAND. use xcopy/? To know all the switches used.
• /A:: Copy all the files with the archive
• /P:: Prompt you before creating each destination file
• /S:: Copies Directories and subdirectories except for empty ones
• /E:: Copies Directories and subdirectories including ones
• /V:: Verifies each new file
• /W:: Prompts you to press a key before copying
• /H:: Copy hidden and system files
• /U:: Copy only files that already exist in the destination
• /P:: Prompts you before creating each destination file
• /Q:: Doesn’t display file name while copying
• /F:: Displays full source and destination while copying
And many more
SYS COMMAND
SYS COMMAND is another external dos command which is used to transfer system files into the
destination drive and make the drive bootable.
Usually, sys commands copy three files namely command.com, io.sys, and msdos.sys.
C:\> sys a: (Press Enter)
A:\> sys c: (Press Enter)
CHECKDISK COMMAND
CHECKDISK COMMAND OR CHKDSK is an external dos command which is used to check file allocation
table, directories structure it displays a summary of disk usage size of the disk, free space, and used
space.
(Syntax)
C:\>chkdsk A: (Press Enter)
DOSKEY COMMAND
DOSKEY COMMAND is used to recall or remember commands which are previously used by users. You
need to use arrow keys to access the previously used basic dos commands.
(Syntax)
C:\>Doskey (Press Enter)
EDIT COMMAND
EDIT COMMAND is an external dos command which is used to create or edit the existing file present in
the computer system.
When using the edit command allows the user to edit the information or text in a file using a text editor.
to run or execute the edit command you need to have a supporting file named edit.com
(Syntax)
C:\> edit (filename) (Press Enter)
For example, if you want to edit a file named abc.com use the following syntax.
C:\> edit abc.com (Press Enter)
After editing the text inside the file do not forget to save the file using the menu.
ATTRIB COMMAND
ATTRIB COMMAND is an external dos command which is used to change the characteristics of any file
and directory.
• +A is used to set archive attributes to a file.
• +S is used to set system attributes to a file.
• +R is used to set the read-only attributes to a file.
• +h is used to set hidden attributes to a file.
For Example, if you want to hide a file or a directory use the following command.
C:\>attrib +h abc.com (Press Enter)
Now the file abc.com is hidden and you can not view the file using the dir command perhaps if use dir/ah
you can see the file as the file is hidden and dir/ah is used to view the hidden file in the computer system.
Let’s say you need to unhide the file or want to view the file without using dir/ah
(Syntax)
C:\>attrib –h abc.com (Press Enter)
Other switches used in the attrib command are::
• -A:: To deactivate archive attribute.
• -H:: To deactivate hidden attribute set to a file or directory.
• -R:: To reset the read-only attribute set to a file.
• -S:: To reset system attributes to a file.
MODE COMMAND
MODE COMMAND is used to display the characters viewed on a display device
• Co80:: It is used to display 80 characters in a single line.
• Co40:: It is used to display 40 characters in a single line.
• MONO::It is used in black and white monitors.
DELTREE COMMAND
DELTREE COMMAND is an important external dos command where deltree.exe is a supporting file that is
used for executing the command.
The deltree command deletes the entire directory as well as subdirectories containing files. deltree
command prompts the user to proceed or not.
(Syntax)
C:\>Deltree abc (Press Enter)
Here all the subdirectories and files will be deleted and a warning message will appear if you press Y It
will delete and if you press N it will stop executing the command.
There are some switches used in deltree command to know them to use deltree/?.
LABEL COMMAND
This is a Basic external dos command which requires a label.exe file for execution. Using a label you can
change, create or delete the existing label for your hard drives and floppy disk.
(Syntax)
C:\>Label c: (Press Enter)
SCANDISK COMMAND
It is also an external dos command which requires a scandisk.exe file for execution. This file is used
instead of chkdsk.
Scandisk performs a surface scan and diagnoses a bad cluster of the hard drives.
(Syntax)
C:\>scandisk A: (Press Enter)
10 DOS Commands Examples
# Dos Commands
1 FORMAT
2 FDISK
3 SYS
4 CHKDSK
5 XCOPY
6 COPY
7 RENAME
8 EDIT
9 ATTRIB
10 DELTREE
Differences Between Internal and External Dos Commands in Tabular Form
# Internal Dos Commands External Dos Commands
1 Internal dos commands are operated with the
help of command.com.
External dos commands are operated and handled
with the use of the external file.
2 Internal dos commands are executed in the
command shell.
External dos commands are executed using a kernel.
3 Internal dos commands are stored in RAM
[Random Access Memory].
External dos commands are stored in the hard disk
drive.
4 Internal dos commands are faster in operation
and execution.
External dos commands are slower compared to
internal dos commands.
5 Examples of internal dos commands are MD,
CD, MD, TYPE, etc.
Examples of external dos commands are Format,
FDISK, Backup, Scandisk, etc.
Types of DOS [Disk Operating System]
There are basically 2 types of DOS
1. PC-DOS.
2. MS-DOS.
Advantages and Disadvantages of Dos
# Advantages of DOS Disadvantages of DOS
1 Dos is an Open-Source Licensed Software. It is a Single User and Single Tasking Operating System.
2 DOS is a lightweight operating system. It is not a multitasking and multiuser operating system.
3 DOS is faster compared to other OS It is a 16-bit operating system and supports 640 MB
RAM.
4 The programs and applications are
considerably fast compared to other OS.
DOS cannot connect to other computers via “Computer
Networking”; internet use is also restricted.
5 DOS commands are not case-sensitive. Commands with spelling mistakes can not be executed
6 DOS is a command-line operating system. The dos command can sometimes be difficult to
memorize and learn and execute.
7 DOS needs less power. DOS does not support GUI [Graphical User Interface],
Different Versions of DOS in Tabular Form
DOS Version Year Developer
86-DOS 1980 Tim Paterson
PC-DOS 1.0 1981 Microsoft
PC-DOS 1.1 1982 Microsoft
PC-DOS 2.0 1983 Microsoft
PC-DOS 3.0 1984 Microsoft
IBM -DOS 4.0 1988 IBM
DR DOS 5.0 1990 Digital Research
DR DOS 6.0 1991 Digital Research
MS-DOS 6.22 1994 Microsoft
Frequently Asked Questions [FAQs] on Basic DOS Commands
What 3 Basic Commands in DOS are Frequently Used?
CLS, COPY CON, and DIR
How Many Commands are in DOS?
There are more than 100 dos commands present.
How Many Bits are in DOS?
Dos is considered a 16-bit operating system.
What is DOS language?
C and Basic.
MS-DOS Stands For
Microsoft Disk Operating System.
Is DOS a Single User?
Yes, DOS is a single-user and single-tasking operating system.
Is DOS A Application Software?
No, DOs fall in the category of SYSTEM SOFTWARE.
Is DOS an Open Source Software?
Microsoft Corporation has Licensed it as Open Source Software.
Are DOS and Linux the Same?
No, there is a big difference DOS is a single-user operating system whereas Linus is a multiuser operating
system.
What are the three parts of DOS commands?
(1) I/O handler, (2) command processor, (3) auxiliary utility programs.
For More Information Please Do Visit:
• https://www.chtips.com/msdos/basic-dos-commands/
What is MS-DOS (Microsoft Disk Operating System)?
Last Updated: April 30, 2025, Tolga Bagci
MS-DOS was a PC operating system created by Microsoft from QDOS and initially used by computers
manufactured by IBM.
Controls are the key words that immediately affect the appropriate final action after entering keywords and
to pressing the <ENTER> key. Commands per type in keywords and press the key <ENTER> seek additional
information or actions to make the final action performed. Commands are short keywords and action is
usually quick and easy. Furthermore the description of commands with syntax along with a description of
their purpose and method of use:
CHKDSK_[disk:][/F][/V](Ext)
Performs simple diagnostic disk. Switch ' /F ' provides automatic correction of detected defects, and ' /V '
displays the name of the file whose trial is in progress. For example:
CHKDSK A:/V Performs a disk check, asking for correction
found errors (none /F) and displays the name
test files.
DATE_[mm-dd-gg] (Int)
The fit with the brackets changes the current system date. If there is no amendment in parentheses asks to
enter the new date. Form may be different if the parameters of the other state.
DISKCOPY_[sourceDISK:_[destinationDISK:]]_[/V](Ext)
Allows copying of disks. The ' /V ' provides control accuracy and copying process takes longer. The
destination disk should be pre-formatted.
Examples:
TIME_[ss:[mm:]] (Int)
Displays (if changes are typed option in parentheses) time, which is currently in the computer's memory.
When changes are enough to enter the hours and minutes, although it is possible to add a second and
hundreds. Without a parameter displays the current time and asks for a new entry, and press <ENTER> key
stops the program.
VER (Int)
Displays the current version of the OS that is installed in the system.
VOL_disk: (Int)
Briefly shows characteristics of the devices to which the command applies.
Edit files
EDIT command allows you to make changes to the files of textual content. The user will have the most needs
for harmonization of the file contents:
CONFIG.SYS - File that defines the configuration of the system. Based on the data, it is determined
where he will be resident OS programs to reach over 1 MB memory, how it will be possible to open
the file at the same time, what will be the initial state of a set of numerical keys and more.
AUTOEXEC.BAT - Start file, which determines which paths are always accessible, call or mouse shell,
determines what the initial prompt, and the like. In essence, a sequential list of commands and OS
commands.
Specified file is read after power and reach of computer systems on the disk. In one line may be indicated
only one OS command and its parameters. To set the correct parameter is useful when you enroll all roads
and calls for additional devices used MEMMAKER command that runs a program that successfully support PC
and optimizes parameters in these files. Not recommended for novice users to use.
EDIT command in his work relies on program support QBASIC (Quick BASIC) language processor as the
composition of the OS. Its activation will show a window in the upper line of the window has the main menu
(MENU BAR) who grabbed by pressing <ALT>.
Horizontal arrow selects a menu of the desired (FILE, EDIT, SEARCH, OPTIONS or HELP) or by pressing toward
increasing / underlined letter in the menu name. When selecting the desired term or press the corresponding
button opens a drop-down menu (POP MENU), which allows retrieval of vertical selection of the desired
term.
Terms that have dots (...) after the name indicate the additional choice of choosing.
Meaning of certain terms main menu and its contents listed after:
FILE - choose a file for the work
CHOICE of CODE TABLE - selection and setup the PC according to the standards of the state and the
CHCP (changing table), MODE (change characters) KEYB (choice of keyboard layouts), COUNTRY.SYS
(country code, currency), DISPLAY.SYS (display case) and NLSFUNC (loaded required tables in
memory) and associated controls at KEYBOARD.SYS and EGA.CPI.
REVIEW of SYSTEM PARAMETERS - software called MSD (Microsoft Diagnostics) to review the
parameters of monitor, motherboard, I / O channels, memory, disk, and more.
ANTIVIRUS REVIEW - view the contents of the disc to the existence of the virus to the list of samples.
There are MSAV (Microsoft Anti-Virus) to view the disc and VSAFE (Virus SAFE) program, which is set
as a resident in working memory and 'keeps' system.
SYSTEM OPTIMIZATION - optimal adjustment of the properties of the motherboard, memory size and
other. Performs a program support MEMMAKER (Memory maker).
DISK MAINTENANCE - developed that is used to periodically wipe the remains unconnected already
deleted or damaged files (SCANDISK) and rearranged file contents sector-by-sector one after another
that they are not scattered all over the disk (DEFRAG). This procedure should be done once a month.
There are a few more features (like FDISK, DBLSPACE) that are appropriate for the use of users who are very
good at coping with the OS. It is not recommended to use these commands if you are not beginners several
times with the same use a more experienced user.
Do not learn on own mistakes!
SUMMARY:
A short description of each command is given OS command FASTHELP, which has an embedded call control
printing from the command MORE. In several screens lists the commands and all commands and their
purpose, which is shown in the following consolidated list.
APPEND Allows programs to open data files in specified
directories as if they were in the current directory.
ATTRIB Displays or changes file attributes.
BREAK Sets or clears extended CTRL+C checking.
CD Displays the name of or changes the current directory.
CHCP Displays or sets the active code page number.
CHDIR Displays the name of or changes the current directory.
CHKDSK Checks a disk and displays a status report.
CHOICE Prompts the user to make a choice in a batch program.
CLS Clears the screen.
COMMAND Starts a new instance of the MS-DOS command interpreter.
COMP Compares the contents of two files or sets of files.
COPY Copies one or more files to another location.
CTTY Changes the terminal device used to control your system.
DATE Displays or sets the date.
DBLSPACE Creates and manages drives compressed by
using DoubleSpace.
DEBUG Starts Debug, a program testing and editing tool.
DEFRAG Reorganizes the files on a disk to optimize the disk.
DEL Deletes one or more files.
DELOLDOS Deletes the OLD_DOS.1 directory and the files it contains.
DELTREE Deletes a directory and all the files
and subdirectories in it.
DIR Displays a list of files and subdirectories in a directory.
DISKCOMP Compares the contents of two floppy disks.
DISKCOPY Copies the contents of one floppy disk to another.
DOSKEY Edits command lines, recalls MS-DOS commands,
and creates macros.
DOSSHELL Starts MS-DOS Shell.
DRVSPACE Creates and manages drives compressed by using DriveSpace.
ECHO Displays messages, or turns command echoing on or off.
EDIT Starts MS-DOS Editor, which creates and changes
ASCII files.
EMM386 Enables or disables EMM386 expanded memory support.
ERASE Deletes one or more files.
EXIT Quits the COMMAND.COM program (command interpreter).
EXPAND Decompresses one or more compressed files.
FASTHELP Provides summary Help information for MS-DOS commands.
FASTOPEN Decreases the amount of time needed to open frequently
used files and directories.
FC Compares two files or sets of files,
and displays the differences between them.
FDISK Configures a hard disk for use with MS-DOS.
FIND Searches for a text string in a file or files.
FOR Runs a specified command for each file in a set of files.
FORMAT Formats a disk for use with MS-DOS.
GRAPHICS Loads a program that can print graphics.
HELP Provides complete, interactive Help information
for MS-DOS commands.
INTERLNK Connects two computers via parallel or serial ports.
INTERSVR Starts the Interlnk server.
KEYB Configures a keyboard for a specific language.
LABEL Creates, changes, or deletes the volume label of a disk.
LH Loads a program into the upper memory area.
LOADFIX Loads a program above the first 64K of memory,
and runs the program.
LOADHIGH Loads a program into the upper memory area.
MD Creates a directory.
MEM Displays the amount of used and free memory
in your system.
MEMMAKER Starts the Memmaker program, which optimizes your
computer's memory.
A more detailed description of the controls and commands the support program called HELP. Per-call
assistance through controls of EDITOR allows the choice of the term using the arrow keys and get a detailed
description of the commands and command syntax OS even mali examples of the use thereof. Chance of a
direct call to the command e.g.
HELP DIR (should not specify a file type)
Experienced users tend to rely on one of the SHELL, because they do not have almost anything and all actions
are performed using the mouse and a few keys. Such programs usually have built-in support for viewing
content and characteristics of various types of files, and allow immediate review .dbf or .pcx or other files.
These are for example NORTON COMMANDER or XTGOLD.
Phenomenal tool for working with files in DOS environment just NORTON COMMANDER (NC). Its design and
inspiration for today's tools the same purpose in a much more advanced operating systems. If it was installed
mouse support work with him was even simpler. Red rectangle in the following Figure is the mouse pointer.
NC shows the interface of the next image.
Was used a few more versions of DOS (Disk Operaing System) operating system, as well as PC DOS, whose
roots are in essentially the same up to version 3.3. MS DOS is a product of the company Microsoft, and PC
DOS is the continued development of the same operating system under the aegis of the company IBM. There
is no the essential difference between them in the work. But graphical environment under the control of the
Windows software is becoming increasingly popular and more efficient (due to the development of
technology.) Almost all of today's software tools have a version developed for the Windows environment.
WINDOWS environment issue is the next Chapter.
Basic external aid WINDOWS system is a device exactly named MOUSE. Communication mouse comes down
to the fact that the mouse POINTER by moving your mouse cursor over the field, and once or twice quickly
pressed (clicked) per mouse buttons to order the execution of tasks. As for this, will be used hereinafter
abbreviated individual actions with the mouse, as follows:
L1 - The matching of the mouse cursor (POINTER) and ONE-click
the LEFT mouse button in order to select a term or icon
(small picture of application on Windows) or window.
Then the concept, icon or window change color or shape
or both, depending on the method of program support.
There are no added activities.
Internal DOS Commands are those commands that are loaded automatically in the memory when the DOS is
loaded on the Memory during the booting process. These commands are easier to use and do not require
any external files for their storage.
The Intern DOS commands are used for common jobs such as copying, erasing, and remaining files. Some
Common Internal DOS are CLS, Ver, COPY, Volume, Date, Time, Tree, MD, CD, RD, Copy, Del, Ren, Move,
Path, Label, Promot, etc.
DOS Internal Commands with Syntax and Examples
1. MD COMMAND (Make Directory)
MD command is used to create a new directory or subdirectory in the Disk.
Syntax–
C:\>md (direcoty name)
Example-
c:\> md ram
2. CLS COMMAND (Clear)
CLS is one of the internal DOS commands that is used to clear the DOS screen. If you can clear whatever
command you ran on the screen through the CLS command.
Synatx-
C:\>cls
3. CD COMMAND (Change Directory)
CD is internal dos command used to change the directory (to insider or come out). If you want to go from
one directory to another, then you can go with the CD command.
Syntax–
C:\>cd (Directory name)
Example-
C:\cd sonu
4. COPY CON COMMAND
COPY CON command is used to basically create a file. The only disadvantage of the command is that the
created by COPY CON command cannot be modified.
Syntax-
C:\copy con (file name with extension)
Example-
C:\copy con krishna.txt
5. COPY COMMAND
The COPY command is used to copy the file and move the file to another location or folder or drive.
Syntax-
C: \> Copy <File Name> <New Name>
C: \> Copy <Path File Name> <Target Drive>
Example-
C:> Copy C:\ABC*.* D:\sonu and, Press enter.
6. DATE COMMAND
The Date command is used to view the system’s current date. if you want to modify the date then you can
easily do it from the date command.
Syntax-
C: \> date
Example
C:>date
The current date is: 10/12/2021
Enter the new date: (dd-mm-yy) 09/12/2021
7. TIME COMMAND
The time command is used to view the system’s current date. if you want to modify the date then you can
easily do it from the time command.
Syntax-
C: \>time
Example-
C:>time
The current time is: 23:23:27.63
Enter the new time: 23:25:50.43
8. DEL COMMAND
A DEL command is used to remove a file from the disk. To delete any files or directory from any drive you
would define the path and folder.
SYNTAX-
C:\> Del (file name) delete only one file.
C:\>ABC Del *.* delte all files from ABC folder.
9. RD or RMDIR
RD or RMDIR command is used to remove a particular directory or subdirectory from the disk. Only an empty
directory or subdirectory can remove.
Syntax-
C: \> RD <DIR name>
Example-
C: \> RD <Modi>
10. PROMPT COMMAND
A Promot command is used to change the MS-DOS command the user can on/off the prompt by using this
command.
Syntax-
C: \> prompt_name
Example-
C: \> prompt_games
11. REN COMMAND
A REN command is basically used to change the name of an existing file or folder. If you want to change any
folder name by the REN command you can easily change the folder name. Syntax and example are as below-
Syntax-
C: \> REN <Old File Name> <New File Name>
Example-
C: > REN sonu.txt monu.txt
12. TYPE COMMAND
Type command is an internal command used to view the content of any file. If you want to see what is saved
in that file then you can see by type command.
Syntax-
C:\ > TYPE <DIR name>
EXAMPLE-
C: > RD rawatji.txt
13. VER COMMAND
If you want to see your Windows Operating system then you can see the version information by the VER
command. Follow the syntax and example are below-
Syntax-
C:>ver
Microsoft Windows [Version 10.0.19043.1348]
14. MOVE COMMAND
The move is an internal command used to change the name of any directory. Follow the syntax and example
are below-
Syntax-
C:/> move old dir(name) new dir (name)
C:/> move sonu monu
15. COLOR COMMAND
The COLOR command is used to change the default color of the background. IF you want to change the
default background color of the DOS or Windows command line, from the use of color command you can
easily change.
The color attributes are as follow-
0- Black 8- Gray
1- Blue 9- Light Blue
2-Green A- Light Green
3-Aqua B- Light Aqua
4- Red C- Light Red
5- Purple D- Light Purple
6- Yellow E- Light Yellow
7- White F- Bright White
Syntax-
color (attribute)
Example-
C:\Users\Woodland>color ab
16. REM COMMAND
A REM command is used to insert remarks into a batch file. REM command is mainly used inside the
autoexce.bat, config. sys, etc.
Syntax-
C:\> Rem (Command Name)
Example-
C:\> Rem software.bat
17. MOVE COMMAND
If you want to change any directory name, via the MOVE command you can change the name of a directory.
Follow the syntax and example are below-
Synatx–
C:/> move (old dir name) (new dir name)
Example-
C:/> move prakahs pankaj
18. ECHO COMMAND
If you want to repeat typed text back to the screen and can send a text to a peripheral on the computer, via
the ECHO command you can do it. Follow the syntax and example are below-
Syntax-
ECHO [ON | OFF]
ECHO [message]
Example-
echo happy birthday dear shanvi >> shanvi.txt
19. PAUSE COMMAND
A PAUSE command is used to stop currently running the batch files. The syntax and example of the PAUSE
command is as below-
Syntax–
PAUSE
20. START COMMAND
A START command is used to enable a user to open a separate window from the Windows command line.
Syntax-
START [“title”] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/NODE ] [/AFFINITY ] [/WAIT] [/B]
[command/program] [parameters]
EXAMPLE-
start notepad mukesh.txt
TOP:25 MS-DOS Commands list With Example | list of DOS commands
November 30, 2023 by MKS
In this article, We will know about the top 25 MS-DOS commands list with examples in detail. Nowadays it is
time for GUI mode but sometimes DOS commands Play a Vital role in solving the issue.