10 MS DOS and Its Commands
10 MS DOS and Its Commands
MS-DOS is a single user operating system. It is a collection of programs and other files.
Files and File names: A file is a collection of related information.
The files should have suitable names for their identification in later use.
Rules for naming the files:
1. File names should be of one to eight characters in length with an option of one to three character
extension. Ex. Resume.doc
2. File names can include any one of the following characters:
A to Z (or a to z) 0 to 9, $, &, #, @. %, ( ), { }
The characters which are not allowed are:
:, ; + / \ * as these have special meaning
3. When a file name includes an extension, it should be referred along with its extension and not only with the
first part.
4. Reserved devices names are not allowed. (COMMAND.COM, DATE, etc.)
Types of files in DOS
There are different types of files, according to the usage. To differentiate each file, the computer will give an
extension to identify the different types of files, which are :
Executable Files:
The files with extension of either .COM or .EXE are called executable files. These files are directly executed
by typing their names (without the extension) by the computer. A file with .COM extension refers to
COMMAND file name and the other with .EXE extension refers EXECUTABLE program file.
Batch Files:
The file containing a series of DOS commands, which are executed automatically one at a time in the order
entered, is known as the batch file. A batch file has the extension .BAT. If the batch file is given a special
name AUTOEXEC.BAT, it is automatically executed when the computer is switched on or during booting.
Backup Files:
These are backup files of a file and have extension .BAK. These files are such that their contents can not be
altered (edited). These files are created while working with WORDSTAR package for typing a document.
System Files:
These are program files developed for system control. They have .SYS extension.
.
Directory: It is a collection of files, size, date and time of creation of files.
The main directory of a drive is called Root Directory into which several directories and sub-directories
may exist.
Folder: It is a collection of files.
Types of DOS commands:
There are two types of commands:
i) Internal Commands
ii) External Commands
4. REN: The REN command is used to rename the old file with another name.
Syntax: REN Old file name New file name
Ex. C:\> REN MATHS.TXT RESULT.TXT ↵
5. DATE: It displays current date and asks for new date in (mm)-(dd)-(YY) format.
Syntax: C:\> Date ↵
6. TIME: It displays current time and asks for new tine and if no new time is to be entered press enter.
Syntax: C:\> Time ↵
8.CLS : when you want to clear the screen, type in the following command:
ii) External commands: External commands are small file programs used for doing specific jobs.
2. FORMAT: Formatting a (new) disk imply organizing the new disk into magnetic tracks and
sectors that are readable by DOS. The PC copies files only on a formatted disk.
FORMAT a: formats disk in drive ―A‖
3. VOL: This command displays the volume label of the current disk
4. LABEL: It is used to create, change or delete the volume label on the disk
5. PATH: It is used to provide access to files located on other directories or on other disks.
Thus while in ―C‖ drive, one can directly invoke files of DOS, WORDSTAR (WS) directories by giving the following
command:
PATH = C:\DOS; C:\WS
.
6. MD: It is used to make a new directory (or sub-directory) which is subordinate to the current
(or root) directory. It is specified as follows:
C:\> MD\STATS (or) MD STATS : This command makes (creates) a new directory with
the name ― STATS.