MS Dos
MS Dos
MS‐DOS, acronym for Microsoft Disk Operating System, was introduced jointly by Microsoft
and IBM during 1981. MS‐DOS was the main operating system for IBM PC compatible
personal computers during the 1980s and the early 1990s, when it was gradually superseded
by operating systems offering a graphical user interface (GUI), in various generations of the
graphical Microsoft Windows operating system.
Dos is a single user single tasking operating system which means that the functions provided
by the basic kernel of DOS can be used by only one program at a time. It offers a command
line character user interface, through which the user has to type the commands to execute
them.
Functions of DOS (Disk Operating System)
1. It takes commands from the keyboard and interprets them.
2. It shows all the files in the system.
3. It creates new files and allots space for program.
4. It changes the name of a file in place of old name.
5. It copies information in a floppy drive and hard disk.
6. It helps in locating a file.
7. It searches where the file is located in the disk.
8. If we want the information in the file to be printed, it gives printout of the information.
9. It hides the files and directories so as not to be seen by others.
10. It permanently removes the file.
1
2. External Commands
These external commands are for performing advanced tasks and they do not need some
external file support as they are not stored in COMMAND.com. The external commands are
used less frequently and are stored in some external files which are stored in some secondary
storage devices. Whenever an external command is to be executed then the external file in
which that particular command is stored is transferred from the secondary storage disk to the
main memory (RAM). Example- TREE, DISKCOPY, XCOPY, CHKDSK, ATTRIB etc.
How to open MS-DOS in windows?
• Step 1: Click on Windows.
• Step 2: Search for ‘Run’ or directly use (Windows key+R) to open.
• Step 3: Type ‘cmd’ in run and press ‘Enter’.
• Step 4: MS-DOS will open in many cases with default command prompt i.e. c:\>
VOL
The VOL Command is DOS is used to display the disk or drive space specified. The command
should be typed as VOL.
VER
The VER command in DOS displays the version number of the operating system (OS) or the
command shell.
2
/o List by files in sorted order as per the following sub-switches:
Sort-order n By name (alphabetic),
s By size (smallest first)
e By extension (alphabetic),
d By date and time (earliest first)
g Group directories first,
a By last Access Date (earliest first)
DIR Used for listing files and directories C:\> DIR [/switches]
Directory present in the current disk. Example:‐ C:\> DIR /D
3
MD
The MKDIR or MD command is used to make a new directory or folder in DOS. Along with the
command, the path i.e. the location of the new directory and the name of the new directory
is also to be typed as: MD [Directory_name].
RD
The RMDIR or RD is used to remove or delete a directory or folder in DOS. Along with the
command, the path and the name of the directory to be removed is also to be typed as: RD
[Directory_name].
CD
The CHDIR or CD command is used to change from one directory to another in DOS. Along
with the command, the path and name of the directory to move to is to be typed as: CD
[Directory_name].
COPY
It is used to copy a file from one location to a different one or make a copy of a file with a
different name at the same location. The copy commands to be followed by the source file
name and the path and the destination file name and path as: COPY [Source_file] [Target_file].
COPY CON
CON is the device name used to indicate the console i.e. the Keyboard and the Monitor. The
COPY command can also be used in conjunction with the above device names. In doing so,
the device name is treated as a file name. Here the device name CON is used to indicate that
the source of the file is the input console i.e. the keyboard.
TYPE
TYPE command is used to display the contents or text of any file to the display. We use TYPE
command to view a text file without modifying it.
DEL
It is used to delete a file. The del command is to be following by the path and filename to
delete as: DEL [File_path_and_name].
REN
The RENAME or REN command is used to rename a file or directory. This command is to be
followed by the path and file/directory name to be renamed and the changed file/directory
name as RENAME [Old_file_and_folder_name] [New_file_and_folder_name].
4
Command Used for Syntax
5
Various External Commands
TREE
This command allows the user to view a listing of files and folders in an easy-to-read graphical
format, with the main directory at the top, followed by the sub and sub -sub directories along
its branches. The format of TREE command is TREE [Drive/Path].
DISKCOPY
The DISKCOPY command is used to copy the complete contents of one floppy disk to another.
The two floppy disks must be of same types. This is to be followed by the source and target
drive names as DISKCOPY [Drive1]: [Drive2]:
XCOPY
The XCOPY command is used to copy files and directory trees from one location to another.
The command will copy all the files and directories and sub-directories . The command is to
be typed as: XCOPY [Source_Directory] [Destination_Directory_Destination].
ATTRIB
The ATTRIB command is DOS helps to set the attribute for a file. The different option available
with ATTRIB are:
+ a Marks as an archive file. -a removes the attribute.
+ r Marks the file read-only. -r removes the attribute.
+ s Makes the file as a system file. -s removes the attribute.
+h Makes the file hidden -h removes the attribute
CHKDSK
The CHKDSK command in DOS checks a disk for errors and displays a status report.The
command should be typed as CHKDSK [Drive_Name]
/f Fixes errors on the disk.
/v Displays the full path and name of every file on the disk.
LABEL
The LABEL command in DOS is used to create, change or delete the volume label name of any
drive. This command should be typed as: [Drive_Name] [Volume_name].
6
Command Used for Syntax