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.

Attrib

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 >

Chkdsk

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>

Comp

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

Format

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

Scandisk

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

Tree

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>

Deltree

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

XCopy

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>

Print

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

FDisk

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

Label

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

Doskey

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

More

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

Backup

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

Restore

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

Mem

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

FC

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