Basics About MS-DOS 


MS-DOS  (Microsoft Disk Operating System)
·        MS-DOS is defined as Microsoft Disk Operating System.
·        MS-DOS is the most popular single user operating system in the World.
·        MS-DOS  first version was released I August 1981.
·        Operating System is only the interface between the users and the computer system.
·        Operating System must be loaded in the memory before interact with the machine via the operating system.
·        The  Operating System software is stored o the disk and loaded into the main memory from the disk where it is reside.
  
User Interface
-    User interface refers to the mode and form of interactions between the users and the computer.

Types of User interface
-    CUI  (Character User Interface)
-    GUI (Graphical User Interface)

CUI  (Character User Interface)
-    In the earlier systems, computer uses to interact with through Commands, which is types through keyboard. As much of character typing or command typing was involved in it, this interface is also known as Command User Interface. e.g :- Disk Operating System (DOS)

GUI (Graphical User Interface)
-    Over the time, a new interface was originated which emphasized more upon knowing what is required by one or more clicks rather than typing of commands this interface was more graphics and was known as Graphical User Interface. e.g :- Windows GUI Based

How To Start MS-DOS
-    The method which I am describing is very shortcut and easy method for all new users.
Follow these steps to start MS-DOS  :
      1.  Click on window button + R
      2.  Type  CMD (in capital or small letter)
      3.   Click on Ok

Command
-    Commands are small programs, which are made to perform a particular job.
-    Every command performs different task.
-    Without commands not possible to do any work in Computer.
-    There are two types of command in MS-DOS.

 Two types of Commands :-
       1.  Internal Commands.
        2.  External Commands.

 Internal Commands : 
 -     These commands enter into the computer memory during computer booting. These commands are not in the form of any file; so neither they can be viewed nor can be edited or detected.
For example : MD, CD, TIME, DATE, COPY, COPY CON, TYPE ETC.

Some important Internal Commands :
      1.   CLS : This command is used to clear the screen.
     Syntax :  C:\users>Cls     

      2.  TIME : This command is used to display and set the system Time .
     Syntax :  C:\users>Time

      3.  DATE : This command is used to display and set the system Date .
     Syntax :  C:\users>Date 

      4.  DIR : This command is used for listing the directories and files, their sizes, date and time of last modifications.
          Syntax :  C:\users>Dir

      5.  MD (Make Directory) : This command is used to create directory or sub directory in any drive or any directory.
     Syntax :  C:\users>MD (drive\path\directory name)
     Example : C:\users>MD student & press Enter key

      6.  CD (Change Directory) : This command is used to change your working directory to the directory you specify. In simple way we can say cd is used to change directories from one to another.
     Syntax :  C:\>users>CD (drive\path\directory name)
     Example : C:\users>CD student

       7.  COPY CON : This command is used to creating a files in DOS after inputting in the file, he file will have to save by pressing ctrl + Z or function key f6.
Syntax :  C:\users>Copy Con (file name)
To create the file follow these steps :
(i) Type Copy Con student  
(ii) Type which you want to be type in the file.
(iii) Press F6 function key or CTRL + Z keys to save the file. ^Z will be displayed on the screen, which indicates that the file is complete.
 (iv) Press Enter and after that the DOS will save the file and will display the message ‘1 File(s) copied.
      8.  RD (Remove Directory) : This is used to delete a directory which is empty. (i.e there should be no files and directory under specified directory)
     Syntax :  C:\users>RD (drive\path name)
     Example : C:\users>RD student & press Enter key

      9.  REN : This command is used for renaming of files and folders.
    Syntax :   C:\Users>Ren (drive\path name with file name) (new name)
    Example : C:\Users>Ren student BCA

      10.  COPY : This command is used for copying one or more files from one location to another.
      Syntax :  C:\users>Copy (source file \ with location)  (destination with location)
      Example : C:\>user\Copy BCA F: & press Enter key

      11.  DEL (Delete) : This command is used for deleting the specified files in any locaton.
      Syntax :  C:\users> (drive name\path with file name)
      Example : C:\user\Del> BCA F: & press Enter key

      12.  TYPE : This command is used to view the contents of text files.
      Syntax :  C:\users> Type (drive name\path with file name)
      Example : C:\users> Type BCA & press Enter key

      13.  VER : This command displays the version of the Microsoft Windows running on your computer.

      14.  VOLUME : This command displays the path that how we have come to the present position or sets a search path for executable files.
      Syntax
: C:\>Volume (drive name)

      15.  COLOR COMMAND : The color command allows users running MS-DOS or the Windows command line to change the default color of the background or text. 
      Color Syntax
      Sets the default console foreground and background colors.
      Color (attr)

attr
Specifies color attribute of console output.

Color attributes are specifies by two hex digits. The first corresponds to the background; the second the foreground. Each digit can be any of the below values.


0 = Black
8 = Grey
1 = Blue
9= Light Blue
2 = Green
A = Light Aqua
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

 External Commands :
 -   These commands are stored in the computer list in the form of files. These Commands can be viewed, copied, changed or deleted. For example : FORMAT, COPY, PRINT, SYS, EDIT, TREE, SORT, PROMPT etc.

 Some important Internal Commands :
      1.  MOVE : This command is used to move all files and directory is specified directory to destination directory or drive. We can also rename the file or folder during moving.
    Syntax : C:\users> Move (source path name\destination path) 
    Syntax : C:\users> Move (source path name\destination path) (new name)
    Example  : C:\users>Move D:\BCA E: & press Enter key     
    Example  : C:\users>Move D:\BCA E:  BCA1 & press Enter key 
       
      2.  LABEL : This command is used for displaying and set volume level of the disk, the disk volume level should be less than or equal to eleven character long.

      3.  DEL TREE : This command is used to remove the specified directory, sub-directory & files completely.
    Syntax : C:\users> Deltree (drive\path name)
 
      4.  FORMAT : When any disk is to be used, it should allocates track and sector in order to make it usable. New Disk are blank and unformatted before using them, they should be formatted. The format command creates a new route directory and file allocation table for the disk. Formatting means creating and making new track and sectors on a disk.
Syntax : C:\users>Format (drive name)

FORMAT with /S switch
When the disk formatted with /s option, the disk can be used as a booking disk. C:>DOS>Format A: /s.
The above command copies the OS files MSDOS>SYS,IO.SYS and COMMAND.COM which are required for booting the machine from your system startup drive to the newly formatted disk.  The disk can then be used for booting.

FORMAT with /U switch
Here’s the command C:DOS>FORMAT A: /U
Above command specifies an Unconditional Format which destroys all existing data and prevents you from later unformatting the disk.

FORMAT with /Q switch
This can be used only with the previously formatted disk. This deletes FAT, Root directory and data of disk but doesn’t scan for the bad errors. This is generally used for Quick formatting.
Warning As Format command 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

      5.  X COPY : This command is used to copy files and directory trees from one disk to another disk
          Syntax : C:\users>X Copy (source folder) (destination folder)

      6.  EDIT : This command is used to modify any arched files and with the help of this command we can print the file. It is a menu provides various facilities like ; Cursor movement, edit color, cut, copy, paste, etc.
    Syntax : C:\users> Edit (source file name)
    Example : C:\users> Edit D:\Boy\Ram press Enter key     

      7.  TREE : This command is used to show files in a particular drive or folder.
    Syntax : C:\users>Tree

      8.   DISK PART D:\>Diskpart
     DISK - Display a list of disks. Ex: List Disk.
     PARTITION - Display a list of partitions  or the selected disk. Ex: List Partition.
     VOLUME - Display a list of Volumes. Ex: List Volume.
     VDISK - Display A list of virtual Disk. Ex: Virtual Disk.
     ATTRIBUTE - It helps in hide and unhide any files and folders.
     Syntax for hide : D:/>Attrib +h (folder name)
     Syntax for un-hide : D:/>Attrib -h (folder name)

      9.  BATCH FILE
      -    Batch file is a collection or list of commands that are processed in sequence often without requiring user input or intervention.
      -   With a computer running a Microsoft  operating system such as windows, a batch file is stored as a file with a .bat file extension.
      -   In other operating system may define a batch job in a shell script, containing a list of commands  to be executed one after the other.
Syntax :  C:\users>Copy Con (file name.bat)
In this example below, we use the windows Notepad to create a batch file.
                             I.   Click  on Start
                            II.   Type Notepad in the run box and press Enter
                          III.    Once Notepad is open, type the following lines or copy and paste them.

@echo off
echo Hello this a test batch file
pause
dir C:\users
D:
dir D:
pause

                          IV.    Click File and then Save, and then navigate to where you want to save the file.For the file name , type test.bat and if your version of windows has a save as type option, choose All files, other wise it saves as a text file. Once you have completed these steps, click the Save button and exit notepad.
                           V.     To run the batch file, double-click it like any program. once the batch file has completed running, it closes automatically.

      10.   DISKCOPY
       -   This command copies the contents of one floppy from the source drive to a formatted or un-formatted floppy disk in the destination drive. This command copies the data from particular position on the source disk to  exactly the same position on the destination disk.
Syntax Diskcopy  A:  B:

Note : copies contents of A: to B: drive. This command can be used with /V switch which verifies that the disk is copied correctly.