MS-DOS MS-Dos, the Micro Soft Disk Operating System, is the most popular single user Operating System (OS) for Micro Computers. Ms-DOS is the most flexible and user friendly Operating System. Operating System can be defined as a set of programs designed to interface the Hardware and Software. BOOTING: The process of loading the Operating System in the computer’s memory is known as “Booting”. Before going into the Ms-DOS, we need to understand the process of booting which involves loading the OS from the disk to the RAM. There are three system files in DOS which are as follows: 1. IO.SYS 2. MS DOS.sys 3.COMMAND.COM On switching on the computer the first file to be loaded into memory is the IO.SYS which checks for all the external devices for proper connection and also checks for any new hardware devices attached to the system. After this it loads the MS DOS.SYS into the memory. The MS DOS.SYS is the kernel of the OS and performs the functions of memory management, process control and file management. It loads the functions of command interpretation i.e., makes the user commands meaningful to the hardware. TYPES OF DOS COMMANDS There are two types of commands: 1. Internal commands 2. External commands Internal Commands: Those commands which are available in the file names COMMAND.COM are known as “Internal Commands”. As COMMAND.COM is a part of Operating System and is loaded at the time of Booting Process, all the internal commands are also automatically loaded at the time of Booting. Since these commands are loaded into the computer’s memory, they are also called as “MEMORY RESIDENT COMMANDS”. Internal Commands are: 1. CLS 2.DATE 3.TIME 4. COPY CON 5.DIR 6.TYPE 7. DEL/ERASE 8.REN/RENAME 9.COPY 10. VER 11.VOL 12.PATH 13. PROMPT 14.CHDIR/CD 15.MKDIR/MD 16. RMDIR/RD 1) CLS: This command is used to clear the screen. Syntax: C:\>CLS 2) DATE: This command is used to display today’s date and even allows the user to change it. Syntax: C:\>DATE 3) TIME: This command shows the current time, and asks to current the time. If necessary, change it to press enter. Syntax: C:\>TIME 4) COPY CON: This command is used to create a file. Syntax: C:\>COPY CON <FILE NAME> Note: After you type the data (text) into the file press Ctrl + Z or F6 key and then press Enter Key. Do not repeat the same file name. 5) DIR: This command is used to display the list of files. Syntax: C:\>DIR DIR/P: Displays the list of files in page wise. Syntax: C:\>DIR/P DIR/W: Displays the list of files in wide format. Syntax: C:\>DIR/W 6) TYPE: This command is used to display the contents of file. Syntax: C:\>TYPE <FILE NAME> 7) DEL: This command is used to delete a file. Syntax: C:\>DEL <FILE NAME> 8) REN: This command is used to rename the file. Syntax: C:\>REN <OLD FILE NAME> <NEW FILE NAME> 9) COPY: This command is used to copy the contents of first file into the second file. Syntax: C:\>COPY <SOURCE FILE NAME> <DESTINATION FILE NAME> 10) VER: This command is used to display the version of the operating system. Syntax: C:\>VER 11) VOL: This command is used to display the volume label. Syntax: C:\>VOL 12) PATH: This command is used to change the path in a directory. Syntax: C:\PATH=C:\WINDOWS 13) PROMPT: This command helps to change the system prompt. Syntax: C:\>PROMPT<NEW PROMPT NAME> 14) CD: This command is used to change the sub directory i.e., entering into a new directory. Syntax: C:\>CD<DIRECTORY NAME> 15) MD: This command is used to create a new subdirectory. Syntax: C:\>MD<DIRECTORY NAME> 16) RD: This command is used to remove a subdirectory. Syntax: C:\>RD<DIRECTORY NAME> Note: While removing sub directory it should be empty. External Commands: These commands are loaded externally after booting processing is completed. As these commands basically will be available in the disk, they are also called as DISK RESIDENT COMMANDS. File names with extensions .com, .exe, .bat are considered to be external commands. 1. ATTRIB: This command is used to give attributes to give attributes to a required file. Syntax: Attrib + h <file name> (for hiding it) Attrib + r <file name> (for making it read only) Attrib + s <file name> (for making it a system file) Attrib - h <file name> (for un hiding it) Attrib - r <file name> (for removing the attribute read only) 2. MEM: This command is used to display the details of primary memory i.e., the total memory available, total memory used, number of bytes free etc. Syntax: MEM 3. MORE: This command is used to display the output on the screen page wise. If the contents of a file (incase of big files) is to be displayed pagewise. Syntax: MORE<FILENAME> 4. MODE: This command is used to change the mode of the screen. Syntax: MODE 40 (is used to change the number of characters across to 40) MODE 80 (is used to change the number of characters across to 80) 5. TREE: This command is used to display the directory structure in a tree format. Syntax: TREE (for subdirectories) TREE/F (for subdirectories and files) 6. SORT: This command is used to sort the data. Syntax: SORT (for ascending order) SORT/R (for descending order) 7. SYS: This command is used to transfer the system files from the system to any logical drive/directory. Syntax: SYS 8. LABEL: This command is used to change the volume labels Syntax: LABEL 9. EDIT: This command is used to edit the contents of any life. Syntax: EDIT <FILE NAME> 10. FORMAT: This command is used to format the Floppy or any drive or usb. Syntax: FORMAT <drive name> 11. UNFORMAT: This command is used to un format a formatted floppy or usb. Syntax: UNFORMAT <drive name> 12. UNDELETE: This command is used to undelete a required file. This is some thing reverse to delete command. Syntax: UNDELETE <file name> 13. COMPARE: This command is used to compare two files. Syntax: COMPARE <file1> <file2> 14. DISKCOMP: This command is used to compare two disks. Syntax: DISKCOMP <drive1> <drive2> 15. CHEDSK: This command is used to check the required disk like total number of bytes available, total number of bytes free, total number of bad sectors etc. Syntax: CHDSK <drive letter> 16. DISKCOPY: This command is used to copy the contents of one disk (floppy) to another, that too, tracks and sectors wise, before copying it will even format the floppy. Syntax: DISKCOPY <drive 1><drive 2> 17. XCOPY: This command is used to copy the tree of sub directories to another directory including the files in it. Syntax: XCOPY <source dir name> <target dir name> 18. DOSKEY: This command is used to change the names of the internal commands. It is also used to record the list of the commands used after the system is switched ON. After DOSKEY is installed, arrow key(s), UP and DOWN are used for this purpose. Syntax: DOSKEY WILD CARD CHARACTERS Wild card characters are special characters used to select files with required format. The are 2 wild card characters. 1. Asterisk (*) 2. Question mark (?) Examples: 1. Dir *.* or Dir* displays all files. 2. Dir a*displays files starting with ‘a’ 3. Dir *.a* displays files starting with extensions with ‘a’. 4. Dir p*.a* displays files starting with p and extension with ‘a’. 5. Dir a??.* will displays all the files with any name and the second\ character in the extension should be ‘o’.