DOS Commands Commands are the way of communicating with computers.

Anything we want the
computer system to do is told in the form of commands in the predefined syntax. DOS has two types of commands: -

# Internal Commands # External Commands

Internal commands: These are those commands for which the code for executing them is stored in COMMAND.COM and they execute without the requirement of any other file. When an internal command is issue by the user, the transient portion knows what to do & executes that command.

External commands: These are the independent executable files that can be used as separate utilities also. Information about these files is also stored in the transient portion. When an external command is issued, the transient portion picks up the relevant file of that command & executes it.

INTERNAL COMMANDS
1. Date – It displays the current system date & prompts you to change the date, if necessary. Syntax: C:\>date <mm-dd-yy> 2. Time – It sets the computer’s internal clock if command is issued with parameters otherwise displays the system time. Syntax: C:\>time <hours: minutes: seconds: hundredths> 3. Clear Screen – It clears the screen. The cleared screen shows only the command prompt & the blinking cursor. Syntax: C:\>cls

1

Syntax: C:\>ver 5. Syntax: C:\>copy <source> <target> (Internal Commands continued…………) 11. Syntax: C:\>break <on/off> 7. Syntax: C:\>EDLIN <filename> 12. If you run Break without any parameters. Dir – It displays the list of the files & sub-directories that are in the directory specified. Syntax: C:\> dir <drive:> <path> <filename> 10. CHDIR (or CD) – It changes the current directory or displays the name of the current directory.It displays the current volume label and the serial number of the specified drive. 2 . Vol: . If drive specifier is omitted Vol takes the current drive by default.4. MKDIR (or MD) – It creates a multilevel directory. Syntax: C:\vol <d:> (Internal Commands continued…………) 6. Syntax: C:\>CHDIR (or CD) <drive:> < path> 9. Copy – It copy one or more files to the location specified & can also be used to combine. Syntax: C:\>MKDIR (or MD) <drive:> <path> 8. EDLIN – It is the line-oriented text editor. Del – It deletes the files specified.Ver – Ver command displays the MS-DOS version no. the current state of break checking is displayed. Break – It enables the DOS to check for Ctrl + C & Ctrl – break as the signal to terminate the current program less frequently.

Prompt – It chanes the appearance of the command prompt or displays the current prompt. Syntax: C:\>rename (or REN) <drive:> <path> <original filename> <changed filename> (Internal Commands continued…………) 16. Path – It is used to earch for the executable files in the directories specified. Syntax: C:\>prompt <text> 14. Syntax: C:\> path <drive:> <path> <……> 18.Syntax: C:\>del <drive:> <path> <filename> 13. RMDIR (or RD) – It removes the directory.Type – It displays the contents of a text file or view the contents of any text file without modifying it. Syntax: C:\>RMDIR (or RD) <drive:> <path> 15. Rename (or REN) – It changes the name of the file or files specified & can also rename all files matching the specified filename. Syntax: C:\>verify 3 . Syntax: C:\>type <drive:> <path> <filename> 17. Verify – It verifies that the files are written correctly to the disk.

remove hidden attribute +R: . Syntax: C:\>attrib <+A/-A><+H/-H><+R/-R><+S/-S> <d:><path> <filename> +A: . Comp – It compares two files byte-by-byte and reports the differences. or not.Externel Commands 1.add archive attributes -A: .remove archive attribute +H : .k.add hidden attributes -H: . Attrib – It lets you display or alter the attributes assigned to a file or directory. Syntax: C:\>format <drive name> 4 . Syntax: C:\>chkdsk <d:> <path> <filename> (External Commands continued…………) 3.remove read-only attribute +S: .add read-only attributes -R: .add system attributes -S: .remove system attribute 2. Format – It creates a new directory & file allocation table for the disk. Syntax: C:\>comp <d:>[<path+filename>] <d:>[<path+filename>] 4. Chkdsk – It checks a disk’s file allocation table entries for errors & find whether the files are o.

listing all the sub-directories it encounters is displayed graphically. Scandisk – It checks a drive for errors and corrects any problems that it finds.Doskey – It edits command lines. Syntax: C:\>print <filename> 10. Syntax: C:\>fdisk 11. Syntax: C:\>xcopy <source> <destination> 9. Syntax: C:\>tree <drive name> (External Commands continued…………) 7. modify or delete the label assigned to a disk. XCopy – It is used to copy all the files in a directory. Syntax: C:\>deltree <drive><path> 8. Syntax: C:\> scandisk <drive name> 6. DOS provides for setting up and managing hard disk partitions. Print – It prints a text file. including the files in the subdirectories of that directory. Syntax: C:\>label <drive name> (External Commands continued…………) 12. 5 . FDisk – It is the tool. recalls command lines and creates macros. Deltree – It deletes a directory and all the files and sub-directories contained within it. Label – It lets you create.5. Tree – The structure of the specified drive from the specified directory down.

Syntax: C:\>fc <drive><filename1> <drive><filename2> 6 . Syntax: C:\>mem (External Commands continued…………) 17.Restore – It restores the files that were backed up on a floppy.Syntax: C:\>doskey 13. Syntax: C:\>restore <drive1> <drive2> <path> <filename> 16. FC – It compares two files or sets of files and displays the difference between them.More – It displays one screen of output at a time and in end of each screen displays the message. Backup – It lets the user to take the backup of hard disk files to floppies. Syntax: C:\>backup <source> <destination> 15. Mem – It displays amount of used and free memory in the system. Syntax: C:\>more <drive:> <path> <filename> 14.

Sign up to vote on this title
UsefulNot useful