0% found this document useful (0 votes)
178 views

10 MS DOS and Its Commands

Uploaded by

perweeng31
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views

10 MS DOS and Its Commands

Uploaded by

perweeng31
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

MS-DOS

 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

i) Internal DOS commands:


 Internal commands are those commands which manage files.
 They are loaded into the memory of the PC when PC is booted.
 These are stored in a large file with file name COMMAND.COM, when a PC is booted.
Internal Commands:
1. DIR: Dir displays continuously the directory of file names, file size, date and time of creation.
 C:\>dir d:
 This command displays the list of files and directories from the drive D.
 It can be specified with two options:
 i) Dir/p: It displays files pagewise.
 ii) Dir/w: displays the files of the directory in a five column format. Only file names and their extensions will be displayed without the
date and time of creation.
 In addition, DIR can also be specified with wildcard characters (such as * or ?) to list files sharing a common element in the file name or
extension.
 Eg: DIR STATS.* : lists all files with STATS and other combinations along with the extensions.
 DIR *.COM : lists all files with extension .COM

2. DEL: Deletes a specified file.

Syntax: DEL {filename} ↵


Ex. Del resume ↵
 Suppose you want to delete a file COMPUTER.DOC on A drive, the command will be:
 C:> DEL A: COMPUTER.DOC ↵
.
3. COPY: The COPY command is used to copy files from one place to another.
 Syntax: copy {Drive name} <source file> {Drive name} <target file name>
 Ex. COPY A:MATHS C:STATS ↵

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 ↵

 7.VER: displays the version of DOS


 Syntax: C:\> VER ↵

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

 1. SORT: It sorts the files in alphanumeric order: either A to Z or Z to A


 DIR| SORT (or) DIR/ON : Displays all the files in A to Z order

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

 7. CD : It is used to change from one directory to the other.


 If we have to work with files in the directory ―STATS‖, the directory has to be changed
 to ―STATS‖
 Ex: C:\>CD\ STATS (or) CD STATS : This command changes the root directory to the
 directory ―STATS‖.

 8. RD: It removes or deletes a directory. To remove a directory.


 To remove the directory STATS, the command is C:\> RD STATS21
 9. TREE: It displays the directories and sub-directories existing in a drive with a ―TREE diagram.

You might also like