0% found this document useful (0 votes)
17 views45 pages

Dos Theory

MS-DOS (Microsoft Disk Operating System) is an operating system that manages file and directory operations, hardware configuration, and memory optimization. It consists of layers including the BIOS, DOS Kernel, and Command Processor, and utilizes a booting process to load essential files into memory. The document also details various DOS commands for file management, including commands for displaying, copying, renaming, and deleting files, as well as directory management commands.

Uploaded by

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

Dos Theory

MS-DOS (Microsoft Disk Operating System) is an operating system that manages file and directory operations, hardware configuration, and memory optimization. It consists of layers including the BIOS, DOS Kernel, and Command Processor, and utilizes a booting process to load essential files into memory. The document also details various DOS commands for file management, including commands for displaying, copying, renaming, and deleting files, as well as directory management commands.

Uploaded by

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

DISK OPERATING SYSTEM (DOS) Overview

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

⇨ Manage files and directories


MS-DOS includes commands that perform the following tasks:

⇨ 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

⇨ BIOS (Basic Input Output System)


system from the hardware it is running on. These layers are:

⇨ 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

⇨ File and record management


called system functions. These functions include:

⇨ 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:

⇨ Disk's volume label - given by the user.


DIR Command displays:

⇨ Serial number - generated by the system.


⇨ Directory or filename with the file name extension.

⇨ Date and time the file was last modified.
File size in bytes.

⇨ Total number of files listed.


⇨ Cumulative size of the files listed.
⇨ Free space in bytes remaining on the disk.
DOS Commands | DIR/P
□ To see the contents of a directory one screen at a time, use the /P switch as follows:
C:\>DIR /P
You will be prompted to press any key to proceed to the next screen(s).
DOS Commands | DIR/W
□ To see the listing in a wide format with five file/directory names on each line, use the /W switch as
follows :
C:\>DIR /W
Individual file sizes, date and time of last modification are not displayed.
DOS Commands | DIR with Drive and Path
You may also specify a drive and/or path to view its file and subdirectory names.
C:\>DIR D:
Displays the list of files and subdirectories of the current directory of drive D. ( You can also use DIR D:/P or
DIR D:/W )
C:\>DIR C:\Users
Displays the list of files and subdirectories of the subdirectory \User.
DIR with wildcard * and ?
You can use wildcards (? and *) to display a select listing of a group of files and subdirectories :
an * is used to represent zero or more any characters a ? is used to represent zero or any single character
C:\>DIR *.TXT
Displays all filenames with any primary name which have an extension .TXT.
C:\>DIR S*.*
Displays all filenames starting with S and having any extension.
C:\>DIR S??.*
Displays all filenames whose primary name starts with a S, whose length does not exceed 3 characters and
can have any extension.
DIR Sorted
- To display the directory listing in SORTED order :
C:\>DIR /O
Displays first the subdirectories, then the files SORTED in an alphabetic order.
DIR Commands Options Function
DIR /O : N Sorting is in alphabetic order by name
DIR /O : -N Sorting is in reverse alphabetic order by name
DIR /O :D Sorting is by date and time, earliest first
DIR /O :-D Sorting is by date and time, latest first
DIR /O :S Sorting is by size, smallest first
DIR /O :-S Sorting is by size, largest first
DIR /L Displays directory names and filenames in lower-case.
DIR /B Displays the listing without the heading and the summary information.

DOS Commands | COPY Command


This is an Internal Command. This command creates a duplicate of one or more files. While copying within
the same directory a new name has to be specified.
While copying into another drive/directory the same name could be preserved.
When using a COPY command you type the location and filename of the file you want to copy from (Source),
followed by the location and the filename of the file you want to copy to (Destination).
C:\> COPY Source Destination
- To copy the contents of OLDFILE.DAT to NEWFILE.DAT
C:\>COPY OLDFILE NEWFILE
If NEWFILE.DAT does not exist, it is created. If not, its existing contents are overwritten.
If OLDFILE.DAT does not exist, then you will get a message
file not found – OLDFILE 0 file(s) copied
DOS Commands | COPY with wildcards "* and ?"
- You may also use the wildcards "*" and "?" as follows:
C:\>COPY *.DBF D:
copies all the files in the current directory with the extension .DBF to the floppy drive A. - To copy file(s) into
the current directory, the destination need not be specified:
C:\>COPY D:KEYS.DAT
KEYS.DAT from the floppy drive A will be copied into the current directory. - To verify that the new file(s) has
been copied accurately use /V :
C:\>COPY OLDFILE NEWFILE /V
COPY to Combine Files
- COPY can also be used to combine the contents of two or more files:
C:\>COPY MARCH.DAT+APRIL.DAT REPORT.DAT
This combines the files MARCH.DAT, and APRIL.DAT from the current directory and places them in a file
named REPORT.DAT.
DOS Commands | Create file with COPY CON
COPY CON command can be used for creating a file from the keyboard:
C:\>COPY CON TEXT.DAT
CON is used as the source file, so in effect your keyboard becomes the source file. Whatever is typed on the
Keyboard, is copied to the file TEXT.DAT. You finish typing into the file by pressing CTRL-Z (F6) and then
pressing ENTER to close the file.
DOS Commands | COPY for Displaying a File
- Similarly, COPY can also be used for displaying the contents of a file onto the screen.
C:\>COPY TEXT.DAT CON
here CON is used as the destination file, so in effect your monitor becomes the destination file. The contents
of TEXT.DAT will be displayed on the screen. CON is a DOS reserved word which stands for CONSOLE i.e. the
terminal (Keyboard + Monitor).
DOS Commands | TYPE Command for Displaying a File
This is an Internal Command. This command displays the contents of a text file on the screen.
If you display a binary file or a file created by a program you may see strange characters on the screen.
C:\>TYPE MYDATA.DAT
displays the contents of the file MYDATA.DAT.
- Wildcard characters cannot be used with this command.
TYPE with Output Redirection (>)
The TYPE command along with the output redirection (>) symbol can be used to print the contents of a text
file on a printer.
C:\>TYPE MYDATA.DAT > PRN
will redirect the contents of the file MYDATA.DAT to the printer. PRN is a DOS reserved word for printer.
DOS Commands | REN Command for Renaming a File
This is an Internal Command. This command changes the name of a file or files.
C:\>REN NEW.DAT TRY.DAT
The name of NEW.DAT is changed to TRY.DAT.
If TRY.DAT already exists, DOS displays the following message :
Duplicate file name or file not found.
REN with wildcards * and ?
- You can also use wildcard characters with the REN command.
C:\>REN *.TXT *.DOC
results in only the extensions of all the filenames in the current directory changing from .TXT to .DOC.
- You cannot use this command to rename files across drives or to move files to a different directory location
or to rename subdirectories.
The following uses of the RENAME command are thus INVALID:
C:\>REN MYDAT.DAT A:\NEWDAT C:\>REN C:\DATABASE C:\DATABASE4
C:\>REN MYDAT.DAT \DATABASE\MYDAT.DAT
In all these cases DOS will display an appropriate error message.
DOS Commands | DEL or ERASE Command for Deleting a File
This is an Internal Command. This command deletes the specified files. Once you delete a file from your disk
you may not be able to recover it.
C:\>DEL TRY.TXT
deletes the file by the name TRY.TXT from the current directory.
DEL with wildcards * and ?
- The wildcard characters * and ? may also be used:
C:\>DEL *.DOC
deletes all files with the extension .DOC from the current directory.
- The following command can be used to delete all the files from the current directory or the specified path :
C:\>DEL *.*

DOS displays the following prompt


All files in directory will be deleted Are you sure (Y/N)?
Press Y and ENTER to delete all files in the current directory, or press N and then ENTER to cancel the
deletion.
WARNING : BE CAREFUL WHILE USING THE ABOVE COMMAND !!!
DEL with Other Switches
- You may use the /P switch to prompt the user before deletion:
C:\>DEL TEXT.DAT /P
DOS will prompt you to confirm for deletion as follows :
C:\TEXT.DAT, Delete (Y/N)?

depending on your response, the file will be deleted or left intact.


DEL A:\*.* /P
C:\>
You will be prompted to confirm the deletion of each file in turn.
USE /P WITH EVERY DEL COMMAND AS A SAFETY MEASURE !!!
DOS Commands | MD or MKDIR Command for Making a Directory
This is an Internal Command. This command creates a directory.
When you have a group of logically related files (used with only one program or files that form a specific
project or those that have some logical link), you may want to store them in their own directory.
C:\>MD TAXES

creates a subdirectory in the current directory having a name TAXES.


C:\>MD D:\PROPERTY

creates a subdirectory having a name PROPERTY on D drive.


C:\>MD C:\DATABASE\DATA

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:

will make the floppy drive A as the current drive.


D:\>C:

will similarly make drive C as the current drive.


DOS Commands | The RD or RMDIR Command for Remove a Directory
This is an Internal Command. This command is used for deleting (removing) a directory. Before deleting a
directory, delete all its files and subdirectories. The directory must be empty except for the . and ..
directories. You cannot delete the current directory. You must first change to a different directory (which is
not a subdirectory of the current directory).
C:\>RD TAXES

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.

MS-DOS (Microsoft Disk Operating System): What Is It?


MS-DOS, or Microsoft Disk Operating System, was the first operating system introduced by Microsoft, widely
installed on personal computers.
In 1981, IBM renamed MS-Microsoft's PC-DOS was sold and authorized for IBM PCs, while MS-DOS was
released for x86 computers, going through eight significant versions before being retired from all active
support in 2006.
The Disk Operating System, commonly referred to as DOS, was a widely used operating system for personal
computers.
MS-DOS is not a graphical OS driven by commands and oriented by lines. It has a tidy and easy-to-use user
interface, with a prompt like C: > where users can enter commands.
Unlike Windows, MS-The MS-DOS system is navigated using commands, allowing users to access and manage
files in a more manual way. For example, instead of double-clicking on a folder to open it in Windows, in MS-
DOS you would use the "cd" command to change directory to the desired folder and then use the "dir"
command to list the files within it. This approach requires a more hands-on approach to file management
compared to the graphical interface of Windows.
The Microsoft Disk Operating System (MS-DOS) has several key features, including the ability to run multiple
programs simultaneously, support for various file systems and disk formats, and the ability to read and write
data to floppy disks and hard drives. Additionally, MS-DOS provides a command-line interface for users to
interact with the operating system, allowing them to execute commands and navigate the file system using a
series of text-based commands.
 It is a 16-bit operating system.
 The device cannot be operated with a mouse, instead, input is provided through basic system
commands.
 The maximum space available is 2 GB.
 It is a free OS.
 It uses a text-based interface and requires text and codes to operate.
 It does not support a graphical interface.

List of MS-DOS Commands


MS-DOS Commands are instructions that allow Windows users to perform tasks on files and folders. A file is a
container for collecting information or data, and a directory is a collection of files, with MS-DOS Commands
serving as a way to interact with these digital entities.

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.

VER Command: This Command aims to display the Window's version.

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.

What are Basic Dos Commands? [Internal And External]


In MS-DOS (Disk Operating System) there are two types of Basic dos commands they are internal dos
commands and external dos commands which are used separately to perform specific tasks or
operations.
Internal dos commands are those commands which are included in the command processor
(command.com).
Internal dos commands are built into the command.com file and while the computer has been booted this
file or commands are loaded into the computer memory and you can use these basic dos commands while
the computer is ON.
As internal dos commands are loaded in computer memory it does not require any external supporting
file to execute themselves, internal dos commands are faster as compared to external dos commands and
are really easy to use and execute.
Examples: ver, time, del, md, cd, copy con, cls, date, vol, ren, copy etc
Types of Dos Commands
There are 2 different types of dos commands.
1. Internal Dos Commands.
2. External Dos Commands.
1. Internal Dos Commands.
Internal Dos commands are the core architecture of dos commands they are installed when operating
system is installed on computer system.
These internal dos commands are operated with the help and assistance of the command.com file
located in the root directory of the hard disk drive.
These commands are simple to operate and handle compared to external dos commands.
Examples of Internal Dos Commands are. cls, date, time, rename, etc.
2. External Dos Commands.
External Dos Commands are those basic dos commands which require external supporting files which
may be present on the bootable disk or hard disk, without supporting files you cannot run or execute
these commands.
The External Dos Commands are not built-in command.com files. They are present separately on hard
disk, they are slow as compared to internal dos commands and require a lot of Computer memory to
execute or run
Examples of Basic Dos Commands:: tree, Xcopy, diskcopy, more, fdisk, format etc.
Complete list of Basic Internal Dos Commands and Their Uses
# Internal Dos Commands Uses
1 Cls Clear Screen
2 Date Change Date
3 Copy con Create file.
4 Time Change Time.
5 Type check the content of any file.
6 Rename Rename any file or directory.
7 copy Copy files from one location to another.
8 Delete Delete file from disk.
9 Dir check directories and files present on the disk
10 MD Create Directory.
11 CD Change Directory.
12 RD Remove Directory.
13 Volume Check the Volume of the Disk.
14 Ver Check the Version of the DOS

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.

What is MS-DOS in a Computer?


It is the abbreviation of Microsoft Disk Operating System, an operating system created by Microsoft and
installed on most PCs. DOS is, in addition to an operating system, a set of programs that allow us to
manipulate the information found on disks. In this way, we can work with them efficiently, comfortably, and
quickly. In addition, DOS coordinates the work of the microprocessor. So that everything works well inside
our computers.
Microsoft has been developing DOS since its first version in 1981. Existing versions are used to fix bugs
detected in the previous version or to improve specific parts of the program. If the variation is seen in the
first figure, it is essentially to take advantage of its advantages. This means that significant changes have
been made, for example, regarding the benefits of new microprocessors.
MS-DOS History
Although it is perhaps an old and forgotten operating system by most users, it forms the basis of the most
current operating system.
It began with the purchase of an operating system called QDOS by Microsoft in 1981, which, after making a
few changes, became the first version of the Microsoft MS-DOS 1.0 operating system.
A series of changes occur in the operating system until it reaches version 7.1, where MS-DOS ceases to exist
as such and becomes an integrated part of the Windows operating system.
MS-DOS Versions
Among the versions or developments of the DOS operating system:
1) PC DOS 1.0
PC DOS 1.0 is the first version of DOS, released in 1981, along with the IBM PC. It supports 16 KB RAM and
5.25-inch single-sided 160 KB floppy disks. It allows files with .com and .exe extensions. It contains the
COMMAND.COM command interpreter.
2) PC DOS 1x
Many bugs were fixed in the PC DOS 1.1 version, which supports dual-density floppy disks. In 1982, version
1.25 was released, adding support for double-sided floppy disks.
With version 2.0, added support for IBM 10 MB hard drives and the possibility to read 5.25 floppy disks with
360 KB capacity, it wasn’t until 1983, the following year, that the system had more functionality.
In the same year, new keyboard characters were added to version 2.11.
In 1984, Microsoft added support for 1.2 MB high-density disks in MS-DOS 3.0 and the possibility of installing
a hard disk with a maximum of 32 MB. In the same year, support for MS networks was added in version 3.1.
Three years later, in 1987, with the release of version 3.3 and the use of hard drives larger than 32 MB, it was
allowed to support existing 3.3 and known 3.5″ floppy disks.
Microsoft released version 4.0, and with it, XMS memory support and the possibility to include hard drives up
to 2 GB. It should be noted that this version is the biggest disaster carried out by the company, as it is full of
failures. This was fixed in version 4.01, which corrected all these issues and errors in 1989.
One of the most relevant advances in MS-DOS history is the transition from version 4.01 to version 5.0 in
1991, where DOS could load programs into the high-memory part of the system using higher memory. In
version 5.0, the BASIC programmer and famous EDIT editor have been added.
A utility has also been added to run UNDELETE (Recovery of deleted files), FDISK (Partition Management)
utilities, and SETVER programs designed for previous versions of MS-DOS. Some problems with UNDELETE
and CHKDSK in version 5.0a were resolved at the end of 1992.
3) MS-DOS 6.0
It appears with many new features that are responsible for compressing the disk and thus have more usable
space, including a basic antivirus (MSAV), a defragmenter (DEFRAG), a memory manager (MEMMAKER), and
some older features.
In the same year, version 6.2 was released in 1992, which added security to the data loss of Doublespace and
resolved issues with a new disk scanner, SCANDISK, DISKCOPY, and SmartDrive.
4) MS-DOS 6.21
Appearing in 1993 in the same year, Microsoft was suppressing Doublespace and was looking for a new
alternative for this utility.
A year later, the solution to the Doublespace problem in 1994, Stac Electronics, which chose to be included in
version 6.22, appears to be the benefit of the Drivespace company.
5) PC DOS 6.3
PC DOS 6.3 was released in April 1994. Already, with the release of Microsoft Windows 95 in 1995, MS-DOS
was taken to a secondary level.
However, the MS-DOS system was still version 7.0 in 1995, where many utilities had been fixed and provided
support for long names. Utilities deleted from the previous operating system can be found in the Windows
95 CD\other\oldmsdos directory.
6) MS-DOS 7.1
In 1997, Windows 95 OSR2 appeared, and with it, a comprehensive revision of the DOS system added
support for FAT32 partitions. This is the history of MS-DOS versions. It was later integrated into Windows 98
and 98 SE. Supports FAT32 file systems.
7) MS-DOS 8.0
It is included in Windows Me. It is the latest version of MS-DOS.
8) PC DOS 2000
It is the new version that solves the problem of the year 2000.
Currently, the MS-DOS operating system is used very little. In most cases, it is used only when Windows
cannot perform its task or fails. Many technicians in the computing area use MS-DOS to perform PC
maintenance, setup, formatting, and partitioning of hard drives and scans.
Characteristics
MS-DOS is a single-user, single-task operating system for personal computers.
MS-DOS Commands
Here are some of the commands that MS-DOS uses and that are currently available from the command line
on Windows operating systems:
Command Description
CD
It changes to a lower hierarchical directory.
directory_name
It specifies the paths where the operating system looks for executable files, typically
CD\ *PATH
written in Config.sys and batch files.
CLS It clears all commands and information on the screen except the drive letter in use.
COPY It copies a file from one directory to another.
COPY CON It creates .bat extension files.
DIR Lists directories and files in the current drive or directory.
FOR It repeats a command.
PROMPT It changes the directive’s screen line.
MD It creates a new directory.
RD/RMDIR It deletes a directory.
REM It adds comments to batch files.
REN/RENAME It renames files and directories.
SET It assigns values to environment variables.
TIME It displays or changes the internal clock time.
It displays the content of a file. They are typically used to view the contents of a file in text
TYPE
format.
SEE It shows the version of the operating system.
VOL It shows the label and volume of the hard drive.
MEM It shows the amount of RAM used and free space.
External Commands
ATTRIB: Displays the attributes of directories and files without parameters. It replaces the attributes of
directories and files with parameters.
The attributes of directories and files are read (r), write (w), file (a), hidden (h), and system (s).
Parameters: Attrib (plus or minus) and the letters r, w, a, and h “v.” Example: Attrib + r *. * (Read-only
attribute for all files in this directory)
Command Description
APPEND Used to specify paths for data files.
BACKUP It backs up one or more files from the hard drive to a floppy disk.
It checks for errors on the hard drive. (It can also be used with the “/F” parameter to fix the
CHKDSK
mistakes)
DELTREE It deletes a directory along with all its subdirectories and files.
It allows for the making of identical copies from one floppy disk to another; it belongs to the group
DISKCOPY
of external commands.
DOSKEY It keeps commands executed at the command prompt resident in RAM.
FC It compares files.
It allows the creation of a logical structure on physical storage units (hard disks, floppy disks, and
FORMAT
mass storage units).
PRINT It allows the printing of files.
These parameters can be used together:
Command Description
KEYB Sets the keyboard language according to the added parameter.
LABEL Displays or changes the label of the hard drive.
MEM It shows the RAM, used space, and free space.
MOVE Moves or changes the location of a directory or files. Also, renames subdirectories.
SUBST Creates a virtual logical drive from a directory.
TREE Displays directories in a tree format.
Redirections
<: Redirection of the standard entry.
>: Redirection of the standard entry. If there is no file, it creates it and overwrites its content, if any.
>>: Redirects standard output to an existing file. If there is no file, it creates one; if one exists, it adds the
result of the command after the previous content of the file.
Control Mechanisms
MS-DOS is a single-user, single-task operating system. By meeting these two conditions, the processor is
always specific to executing a process, so the planning of the processor is simple and dedicated to the only
efficient method that can exist at any time.
MS-DOS includes five essential elements for controlling and deploying processes:
1. ROM-BIOS.: It is an input and output management program between the operating system and the
computer’s primary devices.
2. IO.SYS.: A series of instructions for transferring input/output from peripherals to memory. It
initializes the system and includes built-in device drivers.
3. MSDOS.SYS.: It is the MS-DOS kernel with instructions for checking diskettes. It is a program that
manages files, directories, memory, and media.
4. DBLSPACE.BIN.: It is the kernel controller of the hard disk compressor to increase the storage
capacity of the disk, available from version 6 of MS-DOS. This drive performs all file compression and
decompression operations and can be moved to higher memory than traditional memory.
5. COMMAND.COM.: It is the interpreter of commands that the user communicates with the computer.
It interprets the written commands and includes internal DOS commands that are not displayed in
the system directory.
The IO.SYS, MSDOS.SYS and DBLSPACE.BIN files are hidden, meaning they do not appear when listing the
directory and are loaded from disk to computer memory when starting the directory. In DOS control, there
are two ways to boot the system:
1. It caches input and output devices, keyboards, monitors, hard drives, floppy disks, and memory
(RAM). Then, it looks at the floppy drive first, and if there is a floppy disk with the operating system,
it starts it. Otherwise, it looks at the hard drive.
2. It is performed by turning off the computer with the reset button or Ctrl+Alt+Del. All previous tests
have not been done, and they are installed directly. It is usually used after the operating system
crashes or a computer crashes.
Among the programs that interfere with the control of the DOS operating system:
Bootstrap
It is responsible for starting the computer. They are also known as IPL (initial program load). The Bootstrap
program is programmed in BASIC. The first program in the ROM reads the disk startup program, which
determines whether the IBMBIOS.COM and IBMDOS.COM files are on the disk.
If it finds the files, it first runs IBMBIOS.COM, which consists of two parts:
BIOS: It is the department responsible for the control of environmental units.
SYSINIT: It is responsible for determining the amount of continuous memory in the computer.
It then runs IBMDOS.COM, and SYSINIT goes from the low part of the computer memory to the high part and
leaves the low part to IBMDOS. The first thing it does is control the peripherals to ensure that they work
correctly. After controlling peripherals, SYSINIT returns and calls Kernel services to execute the CONFIG.SYS
file.
Finally, SYSINIT calls DOS services and installs COMMAND.COM. The launch party will load the
AUTOEXEC.BAT file.
After that, the startup partition SYSINIT and COMMAND.COM are cleared from memory.
BIOS
Refers to the Basic Input/Output System. It is specific to each manufacturer and is responsible for controlling
the input and output hardware units. The BIOS is loaded by reading the IBMBIOS.COM or IO.SYS file and
saved in RAM.
IBMDOS.COM
It is the core of the system. Its functions are file management, memory management, and the creation of
other programs. It is independent of the hardware used. It includes a number of services.
COMMAND.COM
It is an interface between the user and the device through a series of prompts and response messages for
user commands. He is responsible for grammatical analysis and manages the user’s commands.
COMMAND.COM is also responsible for managing interruptions. The cutting system has a simple priority
hierarchy to deal with interruptions caused by peripherals. When an interruption treatment ends, the control
is returned to the running program when the interruption occurs.
It is also about addressing any error that may occur during the execution of a program, returning control to
the program where the error occurred, and, if possible, correcting the error.
It manages the internal commands directly linked to it. It is not mandatory to use it.
It is divided into three parts:
1. Settled: It is installed under the memory, on top of the kernel and BIOS. Ctrl + Break processes critical
errors using Ctrl + C keys.
2. Initialization partition: It is loaded on top of the built-in partition and is responsible for processing the
AUTOEXEC.BAT file, then it is deleted from the RAM.
3. Temporary module: It is loaded into the upper part of the memory, and its purpose is to prepare the
command prompt or command required to enter and execute instructions. It is installed when
needed and removed after the command is executed.
CONFIG.SYS
Config.sys is a system file created or modified with any text editor.
It runs before Autoexec.bat and includes a set of computer configuration commands. Some of its parameters
show the number of files that can be opened simultaneously. It has no size limitation and should be located
at the root of the disk. In addition to the files, there are other “typical” commands in this file:
 Buffers: It is the intermediate storage area where things are temporarily stored to transfer data.
 Country: Indicates the country you are working in so that the correct country characters are
displayed.
 Device: Used to install a mouse, keyboard, and other features.
 Break: It tells DOS whether to check by pressing Ctrl + C or Ctrl + Break.
 Lastdrive: Specifies the last letter of the disk drive that the system will recognize.
AUTOEXEC.BAT
This is a batch file. It is used to start a series of non-essential functions, enter data, activate system controls,
and automatically load programs.
If there is an operating system, it runs automatically. It has no size limitation and should be in the directory
where the system is booting. There are usually a few commands included:
 Keybsp: Updates the keyboard.
 Path: Searches for a program in any folder specified in this command.
 Set: It contains environment variables and their corresponding values.
Like any batch file, AUTOEXEC.BAT has the same features as others: it has a BAT extension, contains
commands, can be run by entering its name after the command prompt, and if we press Ctrl + Pause, the
process is interrupted. In addition, three unique features have been added:
 It has a mandatory name and extension: it should always be called AUTOEXEC.BAT.
 The computer runs every time it starts up. Otherwise, it runs three commands instead: Date, Time,
and Ver.
 It should be located in the root directory of the boot drive.
The AUTOEXEC.BAT file also contains commands to configure the user’s language.
Therefore, the following three basic modules should be included in the AUTOEXEC.BAT file:
 Configuring environment variables.
 Instructions for choosing the language.
 Orders for installing built-in programs.
The first set of commands contains the definition of environment variables. Note that PATH and PROMPT
variables can be defined by the Set command or by specially designed commands called Path and Prompt.

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:

DISKCOPY A: B: /V Allows copying from floppy [A:] to [B:]


only if both devices are the same (e.g.
both disks of 3.5"), and carries out
verification correctness copying.

DISKCOPY A: A: Copies the contents of the original disk


(SOURCE) to the disk requires that the same
inserted into the hole destination (TARGET)
and completion deletes currently stored
contents of the disc.
DOSKEY(Ext)
Usually placed in the starting AUTOEXEC.BAT file to provide memory for about twenty payment orders from
the keyboard. Orders are searching and selecting the vertical arrows to re-execute.
EXIT (Int)
Enables output from the OS when the OS came from other applications e.g. from Windows through the DOS
window.
LABEL_[disk:][newIME](Ext)
You can change the name of the device (disk). If your device name is not specified by the program asks to
enter the new name for the device on which the current OS.
MEM_[/C][/P](Ext)
Provides an overview of the content of working memory. Switch ' /C ' provides a detailed overview and
switch ' /P ' desktop print screen by screen.
NUMLOCK=[OFF|ON] (Int)
Specifies the CONFIG.SYS file and determines the initial status of the numeric keypad. The character ' | '
indicates that the choice of OFF and ON mutually exclusive (only one can).
PATH[;] (Int)
Specifies the starting AUTOEXEC.BAT file in the form of a list of directory that will ensure continuous access
to separated by ' '. If used during operation, without addition, an overview of the list, and if used with the ' '
deletes set approaches.
PRINT_[/D:device]_#FS_[/P](Ext)
Allows you to print files listed in the specification. The device is one of the printers connected to the serial
COM1, COM2, etc., or parallel LPT1, LPT2, etc. (for LPT1 or PRN) port. The ' /P ' allows you to file put on
waiting list if you want to print the contents of multiple consecutive files. So have other activities while the
files are printed in the order in the list mode. Command makes sense only for a text-readable files.
PROMPT_[$p$g$t$d$v] (Int)
Gives form to prompt (e.g. C:\> or MS-DOS Version 6.20C:\>), depending on how you enroll combinations
$p(disc label), $g(label>), $t(time), $d(date) and $v(version OS as in the example). Form is usually set in the
AUTOEXEC.BAT file (as in Example III of this Chapter), and less frequently during the work with the OS. Able
to command higher than those shown.
SYS_disk:(Ext)
Provides fundamental systemic properties of the device to which it relates. According to the syntax of the
command is shown to be set with a device that already has an operating system is the location of the core
system files (COMMAND.COM, and the other three). For example:
C:\>SYS A: At diskette [A:] fundamental systemic properties
creates and copies the boot sector on it
required files (Which?).

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

NEW Creating a new file that has no on disk


OPEN ... Finding and calling existing file
SAVE Storage accessed existing files on the same place.
SAVE AS ... Choice of place and name the new file and storage.
PRINT... Print all or part of the file.
EXIT Exits Editor and return to the OS.

EDIT - changes to the selected file

CUT Delete selected text and save the contents


of the CLIP BOARD.
CLIP BOARD Handy once a warehouse for storage.
COPY Copies selected text in CLIP BOARD.
PASTE Set the content of CLIP BOARD the desired place.
CLEAR Delete selected text without placing content
in CLIP BOARD.

SEARCH - finding the desired

FIND... Entering the term that wants to to find.


REPEAT LAST FIND Repeating previously found.
CHANGE... Entering term that wants to to find and his
replacement with new content in part
or in whole file.

OPTIONS - additional choice

DISPLAY Displays and allows modification of parameters


editor as background color, font and more.
HELP PATH... Allows entry of the device and directory where
contains files with additional descriptions (help).

HELP - retrieval of additional explanations

GETTING STARTED Short instruction on how to use the HELP.


KEYBOARD Description of all the choices
and combinations of keys.
ABOUT... Shows the version of the program
and help copyright holders.
With the presented concepts meet is almost inevitable no matter what the application in question, and
therefore need to remember. Learn now, you know forever!
Certain commands from the right side and the name have shown that a combination of keys required to
perform the same tasks without opening the menu. Work is faster but they should remember. These are
called KEYBOARD SHORTCUTS.
EDIT fully screen editor, that allows changing the contents text files (can not open binary) at any location on
the screen. Navigating through the contents of the file is done using the editor and cursor keys or numeric
sets with deactivated figures. The syntax is:
EDIT_[#FS] (Ext)
For example, a review and possible changes in the content reference MS-DOS to perform the command:
C:\>EDIT C:\DOS\README.TXT

Other commands and orders


Refer to the appropriate tasks groundbreaking advanced users. Mostly they are transient commands and
commands and controls the OS. Using them can be realized:
 COPY PROTECTION - sequentially storing data from disk to disk or tape, and they are: BACKUP
(analyzes the disk and stores the contents of the floppy disk, or vice versa) and RESTORE, recovery
from floppy disk or tape for earlier versions of the OS.

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

 MAKING START MENU - Group assistance MENUCOLOR, MENUDEFAULT, MENUITEM, INCLUDE,


NUMLOCK and SUBMENU allows the creation of start-up menu that contains several different
starting combinations of initial parameters of the system (the default), for example, a combination of
437, a combination of 852, a combination of the Windows environment more convenient and more.

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

L2 - The matching of the mouse pointer and DOUBLE-click the


LEFT mouse button activate the icon as opening the window
which icon represents or does program belongs to icon.

L3 - The matching the mouse pointer and icon, or any special


graphic sign and HOLDING down LEFT mouse button and
simultaneously MOVING the mouse can move the icon or window
or 'smears' the window to the desired location or highlights
(SELECT), a piece of text, or a list of fields and for
leaving key keeps created or labeling changes and issues
need of a warrant for the delete-copy depending on the
application. When moving the mouse the color of objects
along which the cursor moves. Button is RELEASED when the
desired object discolored. Then follows the corresponding
action, usually copying.
The procedure is known as 'DRAG and DROP'
(dragging and dropping the object).

D1 - The matching the mouse pointer to one of the objects


(for example icon) or the content document and ONE-click
RIGHT key mouse triggers the action or program or displays
an ADDITIONAL choice of choosing belongs. In an additional
choice choice is made moving the cursor along the menu
and action L1 at certain choice do some activities.
Menu breaks with L1 outside its frame or key <ESC>.

D3 - The matching the mouse pointer to one of the terms and


pressing and HOLDING the RIGHT mouse button, and moving
the mouse simultaneous. So move icons or selected content
to the destination. When shift the color of objects along
which passes. When the over the object you release the
button opens an additional choice allows you to select an
action with the action L1 at choice. The procedure fits the
description of the associated 'L3' (DRAGGING and DROPPING)
but with an additional choice.
The combination is found in newer Windows applications.

K1 - Disposable pressure on the wheel sets marker (label)


the window in which the cursor by moving the mouse and
the vertical direction to search the active window.
One pull any mouse or keyboard termination of this option
the label disappears and the display monitor displays the
latest status quo. This review is going smoothly, without
skipping lines and speed browsing depends on the speed
of movement of the mouse.

K2 - By turning the dial without pressing done content review


active window to jump out of a couple lines without
moving the mouse. The default behavior of the mouse
can be adjusted by the number of rows.
That will be skipped by one 'tooth' when turning wheel.
Actions K1 and K2 should not expect a default in the Windows 9X operating system. In any case with
Windows is more comfortable to work with MOUSE, but if the 'crash' need to know 'DOS' to help them back
to life.
TOP 09 External DOS Commands with Syntax & Examples
May 20, 2025 by MKS
Hey! DO you want to know External DOS Commands with Syntax & Examples follow this article?

External Command in DOS are


DOS commands that are not present in the COMMAND.COM file but are present in other files having the
extensions COM, EXE, or BAT are called external commands. Some of the important external commands are
explained in the following section.
External DOS Commands
1. EDIT Commands
This command allows the user to view, create and/or modify their computer files. The syntax of this
command is given below:
EDIT [/B] [/H] [/R] [/S] [/<nnn>] [/?] [file(s)]
The following table provides a description of some of the important switches of the EDIT command.
/B This switch forces the file to be opened in monochrome mode.
/R This switch loads the file in read-only mode.
/? This switch displays the help screen.
2. ATTRIB Command
This command allows the user to change the properties or attributes of a specified file. A file can be assigned
the following attributes:
1. Read-Only : When a file is assgned the read-only attribute, you can only view the file but cannot
write to it. The Read-Only attribute of the file is represented as “R”.
2. Archived : When a fileis assiged the archived attributes,it allows the Microsoft backup and other
backup programs to know that a backup of this file needs to be taken. The archived attribute of the
file is represented as “A”.
3. Hidden : When a file is assigned the hidden attribute then it is made invisible to standard users. The
hiddenattribute of the file is represented as “H”.
4. System : When a file is assgned the system attribute then the file is made an important system file.
The system attribute of the file is represented as “S”.
The Syntax of the ATTRIB command is given below-
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/s]
in the above syntax “+” is used to assign the attribute and “-” is used to remove the attribute from the file.
For example. you need to assign Read-Only, and archived attributes to a file named “data.txt”. To do this you
need to use the following command:
ATTRIB +R +A data.txt
Now consider you need to remove the read-only attribute from the data.txt file. In order to do this, you need
to use the following command:
ATTRIB -R data.txt
3. CHKDKS Command
This command checks the hard disk of the computer for any errors and displays a status report that consists
of a number of files, space left, bad sectors, etc. the syntax of the CHKDSK command is given below-
CHKDSK [DRIVE:][[PATH]FILENAME] [/F] [/V]
The various parameter that can be used in a CHKDSK command is explained below-
1. Drive : it is the name of the drive, which is generally an alphabetic charecter.
2. path : it is the location of the directory in the drive.
3. /F : This parameter is used to fix cross linked errors found on the disk.
4. /V : This parameter displays the full path and name of every file present on the disk.
4. DELTREE COMMAND
The DELTREE command is a short form for DELETE TREE and is used to delete a directory along with all the
subdirectories and files present in it. Generally, when a directory needs to be deleted, you need to empty the
content of the directory by deleting the files and subdirectories present in it.
However, when the DELTREE command has been used the files and subdirectories are deleted automatically.
The syntax for the DELTREE command is given below–
DELTREE [/Y] [DRIVE:]PATH [[DRIVE:]PATH[…]]
The various parameter used in the DELTREE command are explained below:
1. /Y is used to suppress the prompt that is displayed to confirm if you want to delete the subdirectory.
2. [drive:]path represents the drive and the path of the directory that needs to be delted.
for example, in order to delete a folder named Accounts present in C: drive and has some files and folders in
it. type the following command-
C:\> deltree accounts
. FDISK Command
This command allows the user to delete and create partitions on the hard disk drive. The syntax of the
command is given below:
FDISK [/STATUS] /X
The various parameters used in the above syntax is given below-
1. /STATUS– When fdisk command is used with this parameter it dislpays the partiiton information
2. /X – This switch is used with FDISK Command to ignore the extended disk-access support.
6. FORMAT Command
Format command is used to erase all the information from the storage device such as hard disk drive, floppy
disk drive, or compact disk drive. The syntax of the FORMAT command is given below-
format volume [fs:file-system] [/v:label] [/q] [/a:unitsize] [/t:tracks /n:sector] [/c] [/x] [/1] [/4] [/8]
Some of the important parameters used in the format command are explained below:
1. Volume : it is the drive letter which is assigned for the hard disk drive.
2. /fs : The type os fiel system to be used for formatting the disk.
3. /V : This is used to provide a label from the drive.
4. /q : This parameter is used to perform a quick format on the drive.
Following command with some of the parameters:
Format C:
7. MEM Command
MEM command is used to determine the used and free memory present on your computer. The syntax of
the MEM command is shown below-
MEM [/CLASSIFY | /DEBUG | /FREE | /MODULE module name] [/PAGE]
The various parameters present in the MEM command are briefly explained below:
1. /CLASSIFY or /C – When MEM command is used with this switch it classifies programs by their
memory usage. That is the output consists of a list of programs, a summary of the memory in use and
lists the largest memory block available.
2. /DEBUG or /D – When MEM command is used with this switch it dispalys teh status of all modules in
memory, internal drivers and other information.
3. /FREE or /F – When MEM command is used with this switch it dispalys information about the free
memory.
4. MODULEor /M – when the MEM command is used with this switch followed by module name, it
displays a detailed listing of that module’s memory use.
8. MORE Command
MORE COMMAND is used to display the output of a command one page at a time if it scrolls to more than
one page on the console of the command prompt. The syntax of the MORE command is given below-
MORE [DRIVE:][PATH]FILE NAME
The following example illustrates the use of the MORE command
To display the content of a text file (for eg. Bills.txt) one page at a time, use the following command:
MORE Bills.txt
9. XCOPY Command
This command is used to move files, directories, and even whole drivers from one location to another. The
syntax of this command is given below-
XCOPY SOURCE [DESTINATION] [/C | /D] [/D[:DATE]] [/P] [/S [/E]] [/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
[/K] [/N]
Some of the important parameters used in the XCOPY command are explained below:-
1. Source : This parameter specifies the file(s) that need to be copied.
2. Destination : This parameter specifies the location where the files need to be copied.
3. /D [:DATE] : When this parameter is used you need to specify a date such that only those files or
directories that are created on or after that day are copied to the destination.
4. /P : When this parameter is used with XCOPY command the user is promoted before creating each
destination file.
5. /S : When this parameter is used all the directories and sub directories except empty ones are copied
to the destination location.
6. /E: When this parameter is used all the directories and sub directories, including empty ones are
copied to the destination location.
7. /F : When this parameter is used the full source and destination file names are displayed while
copying.
8. /L : WHen this parameter is used with XCOPY command all the files that need to be copied are
displayed.
TOP 20 Internal Command in DOS with Syntax and Examples
May 20, 2025 by MKS
Hey! Do you want to know the top 20 Internal Command in DOS with Syntax and Examples then should read
this article-
What is Internal DOS Commands?

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.

Internal DOS Commands list:


1. CLS(Clear Screen) Command
CLS is internal Dos Command used to Clean the screen content.
Command Format:-
C:\> CLS and press enter.
2. VER(Version) Command
This is I.D.C used to know the version of O.S. running.
Command Format:-
C:\>VER and press enter.
3. Volume Command
The Volume command is an internal command used to know the volume name & serial number of the disk
(Hard Drive, Pen Drive, etc).
Command Format:
C:\>Vol and press enter.
4. Date Command
Date is an internal do command used to know and modify system date.
Command Format:
C:\>Date and Press enter.
The current date is 17:10:2020
Enter New Date mm: dd: yyyy and press enter.
5. Time:
Time is an internal do command used to know the system time and to modify also.
Command Format:
C:\>Time and Press enter.
6. Tree:
The tree is an internal Command used to see the directory structure in the disk.
Command Format:
C:\>tree and Press enter.
Note:- This command will work on a DOS-based system
7. MD (Make Directory)
MD is an internal do command used to create directory in the disk.
Command Format:
C:\> MD Dir Name and press enter.
Example:-
c:\>md vijay and press enter.
8. CD (Change Directory) Command
CD is internal dos command used to change the directory (to insider or come out).
Command Format:
C:\> CD Dirname and press Enter.
Example:-
C:\> CD Vijay and press enter.
9. RD(Remove Directory)
RD is internal DOS command used to remove (delete) empty directory.
Command Format:
C:\>rd directory name and press enter.
C:\>rd abc and press enter.
Command Format:
 Display all the content in one go.
C:\> dir and enter.
 Display all the content of disk page wise.
C:\>dir/p and Enter.
 Display all the content include hidden also, page wise.
C:\>dir/a/p and enter.
 Display all the files of any disk starting with characters.
C:\>dir a * and press enter.
 searching any file/directory in the disk.
C:\>dir file/dir name /s/p/a and press enter.
11. Copy Con command
Copy con is an internal do command used to create the file in the disk.
Command Format:
C:\>copy con file name ,enter and press F6 and enter(one file copy).
12. Type Command
Type command is an internal command used to view the content of any file.
Command Format:
C:\> type file name ↲
13. Del Command
Del is an Internal DOS command used to delete the files.
Command Format:
 Delete one file.
C:\> Del file name ↤
 Delete all the file on any Directory.
C:\>ABC>del *.* enter.
14. Ren(Rename) command
REN is an internal do command used to change the name of any directory.
Command Format:
C:\> Ren old name new name and press enter.
15. Move Command
Move is an internal command used to change the name of any directory.
Command Format:
C:/> move old dir(name) new dir (name) and press enter.
16. Label Command
The label is an internal command used to change the volume name of the disk.
Command Format:
C:\> label new name and, Press enter.
17. REM (Remark):
REM is an internal Dos command used to not execute any command.
Command Format:
C:\> Rem Command Name and, Press Enter.
Note:- REM command is mainly used inside the autoexce.bat, config.sys, etc.
18. Path Command
The path is an internal DOS command used to inform about the location of commands.
Command Format:
C:\>path+location and, Press enter.
19. Prompt
Prompt is an internal dos command used to design the appearance of a drive letter.
Command Format:
 Natural prompt
o C:\>prompt $N$G and, press enter.
o C>
 Standard Prompt
o C:\> prompt $p$G and press enter.
20. Copy Command
The copy is an internal DOS command used to copy files from one location to another.
Command Format:
General Format:
C:\> Copy source Drive\source path\ files name \ Target Drive \Target Path.
Example :-
C:\> Copy C:\ABC\*.* D:\xyz and, Press enter.
External DOS commands List
21. CHKDSK Command
CHKDSK is an external dos command used to find the disk info and also solve file linking problem in the disk.
Command Format:
c:\>chkdks and, Press enter.
To solve the file interlinking problem used following Command-
C:\>chkdsk/f and press enter.
22. Scandisk Command
Scandisk is an external dos command and a very common utility to solve a wide range of DISK problems.
Command Format:
C:\>scandisk and, Press enter.
Note:- In general running, Scandisk in a month will increase system performance.
23. Defrag (Disk Defragmentation):
This is an external DOS command and utility used to manage data in the disk. This command will run after the
Scandisk. This is also called data management utility.
Command Format:
C:\>defrag and, press enter.
24. Xcopy Command
Xcopy is an external Command used to transfer the data from one location to another.
Command Format:
C:\>xcopy source drive\*.*/e \Target Path and, enter.
25. Print Command
This is an external Command used to check the printer Port (LPT-Port).
Command Format:
C:\>dir>prn and, and press enter.
1. Internal DOS Commands
Internal commands are built into the command.com file, which is the DOS command processor. These
commands do not require any external files to execute and are immediately available after starting the
system.
Common Internal Commands
 DIR: Displays the contents of the current directory.
o Example: DIR
o Use: Lists all files and folders in the current directory.
 CD (Change Directory): Changes the current directory.
o Example: CD \Documents
o Use: Navigates between directories.
 CLS (Clear Screen): Clears the command prompt screen.
o Example: CLS
o Use: Clears all previously displayed commands and results from the screen.
 COPY: Copies one or more files from one location to another.
o Example: COPY file1.txt D:\Backup
o Use: Copies the file file1.txt to the D: drive.
 DEL (Delete): Deletes a specified file.
o Example: DEL file1.txt
o Use: Deletes file1.txt from the current directory.
 REN (Rename): Renames a specified file or directory.
o Example: REN oldname.txt newname.txt
o Use: Renames oldname.txt to newname.txt.
 TYPE: Displays the contents of a text file on the screen.
o Example: TYPE file1.txt
o Use: Shows the content of file1.txt in the command prompt.
 EXIT: Exits the command line interface.
o Example: EXIT
o Use: Closes the command prompt window.

2. External DOS Commands


External commands are not built into the command processor but are stored in separate executable files
(e.g., .exe, .com files). These commands are typically located in the system directories like C:\Windows\
System32 or C:\DOS.
Common External Commands
 FORMAT: Formats a disk or drive.
o Example: FORMAT D:
o Use: Formats the D: drive, preparing it to store data.
 XCOPY: Copies files and directories, including subdirectories.
o Example: XCOPY D:\Documents E:\Backup /S
o Use: Copies all files and subdirectories from D:\Documents to E:\Backup.
 DISKCOPY: Copies the entire contents of one disk to another.
o Example: DISKCOPY A: B:
o Use: Copies all data from the floppy disk in drive A to the floppy disk in drive B.
 CHKDSK: Checks the integrity of the file system on a disk.
o Example: CHKDSK C:
o Use: Scans the C: drive for errors and provides a report.
 DELTREE: Deletes a directory and all its contents, including subdirectories.
o Example: DELTREE D:\Old_Folder
o Use: Removes the Old_Folder directory and all files and subdirectories inside it.
 ATTRIB: Displays or changes file attributes (e.g., read-only, hidden).
o Example: ATTRIB +R file1.txt
o Use: Makes file1.txt read-only.
 BACKUP: Creates a backup of specified files and directories.
o Example: BACKUP D:\Documents E:\Backup
o Use: Backs up the Documents folder from D: to E:.
 LABEL: Creates, changes, or deletes a volume label (the name of a disk).
o Example: LABEL D: Backup
o Use: Labels the D: drive with the name Backup.

3. Differences Between Internal and External Commands


Feature Internal Commands External Commands
Location Stored in command.com (memory) Stored in executable files (.exe, .com)
Execution Executes without needing external files Requires external files to run
Speed Faster execution as they are built-in Slower execution due to dependency on external files
Examples DIR, CD, COPY, DEL, REN, EXIT FORMAT, XCOPY, CHKDSK, DELTREE, DISKCOPY
Used for basic file management and Used for more complex file operations or system
Usage
navigation maintenance

4. Usage of Internal and External Commands in Real-World Scenarios


 System Maintenance: Internal commands like CD, DIR, and CLS are useful for navigating directories
and managing files when performing basic maintenance tasks.
 File Operations: Commands like COPY, DEL, and REN help users perform essential file management
tasks, ensuring efficient data handling.
 Disk Management: External commands like FORMAT, DISKCOPY, and CHKDSK are necessary for disk
maintenance, ensuring that drives are correctly formatted, copied, or checked for errors.
 Backup and Recovery: External commands like BACKUP and XCOPY allow for efficient file and
directory backup, which is essential for data protection.
9. DEL:- The purpose of this command is to delete file. The user can also delete multiple files
by busing this command and long with while cards.
Syntax : - C : / > Del file name . extension
C : / > Del ramu
C : Del x . prg.
10. MD:- The purpose of this command is to create a new directly or sub directly i.e sub
ordinate to the currently logged directly.
Syntax : - C : /> MD directory
C : /> MD sub directory
Ex : C : / > MD college
Now user wants to create a sub directory first year in college directory then
C : / > cd college
C : / > college > Md first year
11. CD : - The purpose of this command is to change from one director to another directory
or sub – directory.
Syntax : - C : / > CD directory name
Ex : C: / > cd college
C : / > college > CD first year
C : / > college > first year >
If the user wants to move to the parents directory then use CD command as
C : / > college > first year > cd ….
C : / > college >
12 . RD: - The purpose of this command is to remove a directory or sub directory. If the
user wants to remove a directory or sub – directory then first delete all the files in the sub –
directory and then remove sub directory and remove empty main directory.
13. COPY: - The purpose of this command is to copy one or more specified files to another
disk with same file name or with different file name.
Syntax : - C : / > copy A :/> C : /> chinn

You might also like