Computer Fundamental
Computer Tutorial

DOS External Commands

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 and executes it.


It lets you display or alter the attributes assigned to a file or directory.
Syntax : C:\>attrib < +A/-A > < +H/-H > < +R/-R >< +S/-S >< d: >< path > < filename >


It checks a disk‘s file allocation table entries for errors and find whether the files are o.k. or not.
Syntax : C:\>chkdsk < d:> < path> < filename>


It compares two files byte-by-byte and reports the differences.
Syntax : C:\>comp < d:>[ < path + filename>]< d:>[< path+ filename>]


It creates a new directory and file allocation table for the disk.
Syntax : C:\>format < drive name>


It checks a drive for errors and corrects any problems that it finds.
Syntax : C:\> scandisk < drive name>


The structure of the specified drive from the specified directory down, listing all the sub-directories it encounters is displayed graphically.
Syntax : C:\>tree < drive name>


It deletes a directory and all the files and sub-directories contained within it.
Syntax : C:\>deltree < drive>< path>


It is used to copy all the files in a directory, including the files in the sub-directories of that directory.
Syntax : C:\>xcopy < source> < destination>


It prints a text file.
Syntax : C:\>print < filename>


It is the tool, DOS provides for setting up and managing hard disk partitions.
Syntax : C:\>fdisk


It lets you create, modify or delete the label assigned to a disk.
Syntax : C:\>label < drive name>


It edits command lines, recalls command lines and creates macros.
Syntax : C:\>doskey


It displays one screen of output at a time and in end of each screen displays the message.
Syntax : C:\>more < drive:> < path> < filename>


It lets the user to take the backup of hard disk files to floppies.
Syntax : C:\>backup < source> < destination>


It restores the files that were backed up on a floppy.
Syntax : C:\>restore < drive1> < drive2> < path> < filename>


It displays amount of used and free memory in the system.
Syntax : C:\>mem


It compares two files or sets of files and displays the difference between them.
Syntax : C:\>fc < drive>< filename1> < drive>< filename2>