Microsoft Disks Operating System (MS-DOS)

 

INTRODUCTION

MS-DOS is a single user operating system. It is a CUI operating system. It is also called Disk Operating System because it is loaded into the memory from a disk when the computer is switched on. The first version of MS-DOS was released in 1981 i.e. Ver. 1

 

CUI and GUI

A CUI (Character User Interface) operating requires one to type commands in order to get the work done. There is no use of graphics, images or pictures in CUI.

On the other hand A GUI operating system requires one to select or click the desired commands or actions being displayed on the screen.

 

Some important terms:

 

System Prompt: It is a symbol which is either A :\> or C :\>.  It is the starting point of DOS interaction with users. Every command must be given in system prompt at cursor position.

 

Syntax: Syntax is the details writing rules of command or instruction to the system. Each and every command follows a definite syntax. If there is any error in the syntax of a command, it will no way work to give an output.

(Syntax = System Prompt + Command)

 

Command: Commands are the order or instruction to the computer to do a specific task. With the commands, users can interact directly with the computer.

 

File: A file is collection of related information. A file has two parts i.e. 1st name and extention name separated by a dot. E.g. word.docx, excel.txt

 

Directory: A directory is the container of file and subdirectories

 

Classification of MS-DOS Commands:

          MS-DOS commands are classified into the following categories:

1.    Environmental Command

2.    File Management Command

3.    Directory Management Command

4.    Disk Management Command

 

Environmental Command:

 

1.    CLS: It clears the screen                                    

    Syntax: C:\>cls (enter)

2.    Date: It is used to display or set the system date                

    Syntax: C:\>date (enter)

3.    Time: It displays the current time of system.            

    Syntax: C;\> time (enter)

4.    Vol: It displays the volume label and serial number         

    Syntax: C:\> vol (enter)

5.    Ver: It displays the version of the system                 

    Syntax: C:\> ver (enter)

6.    Colon: It is used to change the active drive              

    Syntax: C:\> <drive letter>: (enter)

7.    Label: It displays the volume label of the system              

    Syntax: C:\> label (enter)

8.    Prompt: We use this command to change the MS-DOS command prompt.

Syntax: prompt <text>

Special codes to change prompt:

$Q ------------------       for = (equal sign)

$$ ------------------        for $ (dollar sign)

$T -----------------         for current time

$D -----------------        for current date

$P -----------------         for current drive and path

$G ----------------          for > (greater than sign)

$L -----------------         for < (smaller than sign)

$B -----------------         for | (pipe)

 

File Management Command:

 

1.    Copy con: It is used to create a file                   

    Syntax: C:\> copy Φ con Φ <file name> (enter)

2.    Edit: It is used to create/modify a file              

    Syntax: C:\> edit Φ <file name> (enter)

3.    Type: It is used to see the contents of a file     

    Syntax: type Φ <file name> (enter)

4.    Ren: It is used to rename a file                          

    Syntax: ren Φ (old file name> Φ <new file name> (enter)

5.    Copy: It is used to copy a file from one location to another     

   Syntax: copy Φ <source drive>:\ <file name> Φ <destination drive>: (enter)

6.    Attrib +H: It is used hide a file                         

    Syntax: C:\> attrib Φ +h Φ <file name> (enter)

7.    Attrib -H: It is used unhide a file                      

    Syntax: C:\> attrib Φ -h Φ <file name> (enter)

8.    Attrib +R: It is used to make a file read only  

    Syntax: C:\> attrib Φ +r Φ <file name> (enter)

9.    Attrib -R: It is used to disable the read only mode     

    Syntax: C:\> attrib Φ -r Φ <file name> (enter)

10.                       Del: It is used to delete a file                             

    Syntax: C:\> del Φ <file name> (enter)

 

DireCTORY Management Command:

         

1.    MD: It is used to make a directory                                      

    Syntax: C:\> md Φ <dir name> (enter)

2.    CD: It is used to enter into a directory                                

    Syntax: C:\> cd Φ <dir name> (enter)

3.    CD.. : It is used to come out from a directory                     

    Syntax: C:\>cd.. (enter)

4.    CD\ : It is used to come to the root directory                      

    Syntax: C:\> cd\ (enter)

5.    RD: It is used to remove a directory                                   

    Syntax: C:\> rd Φ <dir name> (enter)

6.    Dir: It is used to display the file & directories                             Syntax: C:\> dir (enter)

7.    Dir/p: It is used to display file & directories in page wise          Syntax: C:\> dir/p (enter)

8.    Dir/w: It is used to display files & directories widely                 Syntax: C:\> dir/w (enter)

9.    Dir/ad: It is used to display only the directories                          Syntax: C:\> dir/ad (enter)

10.  Dir/a-d: It is used to display only the files                           

    Syntax: C:\> dir/a-d (enter)

11. Dir/as: It is used to display only the system files                         Syntax: C:\> dir/as (enter)

12.  Dir/ah: It is used to display only the hidden files                        Syntax: C:\> dir/ah (enter)

13. Dir/ar: It is used to display only the read only files           

    Syntax: C:\> dir/ar (enter)

14. Dir/oe: It is used to display files & directories with extension            Syntax: C:\> dir/oe (enter)

15. Dir/os: It is used to display files & directories with their size             Syntax: C:\> dir/os (enter)

16. Dir/od: It is used to display files & directories with their creation in ascending order

   Syntax: C :\> dir/od (enter)

17. Dir/o-d: It is used to display files & directories with their creation in descending order                  

    Syntax: C :\> dir/o-d (enter)

DiSK Management Command:

 

1.    FORMAT: It is used to format a drive                      

    Syntax: C :\> format Φ <target drive :> (enter)

2.    DISKCOPY: It is used to copy the contents of a drive to another drive               

    Syntax: C :\> diskcopy Φ <drive1 :> Φ <drive2 :>  (enter)

3. CHKDSK: It is used to verify a disk and display a status report        

    Syntax: C :\> chkdsk Φ <drive :> (enter)


Wild Cards Characters:

In MS-DOS there are two wild card characters, they are: ASTERISK (*) and QUESTION MARK (?)

 

1.    ASTERISK (*): It represents any number of character

2.    QUESTION MARK (?): It represents a single character

 

Examples:

i)                  *.* represent all files

ii)               *.txt : display all files having .txt as extension

iii)            S*.* : display files starting with letter S

iv)            ?????.com: display all files having maximum of 5 characters with extension .com

BATCH FILE:

A batch file is a combination of two or more DOS commands grouped together in a systematic manner to carry out a specific job. A batch file helps us to reduce the time and also reduce the number of keystrokes required every time to execute the same set of commands.

 

Naming a Batch file:

A batch file always must have an extension of .BAT. The 1st name of the file should never be same as any DOS command such as DATE.BAT.

 

Creating a Batch file:

          To create a batch file we can use either COPY CON or EDIT command.

          Syntax: C:\> copy Φ con <file name>.bat

                             Date

                             Time

                             Cls

                             (Ctrl+z) (enter)

To executing a Batch file: Syntax: C :\> <file name> (enter)

 

Some of the important commands related to Batch file:

 

ECHO: It is used when we want to display the commands in the batch file

          e.g.    C:\> copy Φ con fan.bat

                   ECHO OFF

                   Cls

                   Md Φ man

                   Cd Φ man

                   Copy Φ con cat

                   ^z

                   1 file (s) copied

 

To know MS-DOS practically, click here





No comments:

Post a Comment