External Commands

External Commands

Published by: BhumiRaj Timalsina

Published date: 13 Jan 2022

External Commands in grade 9, Reference Note

TREE

Syntax: TREE
Use: Used to display all the files , sub-directories and directories in a tree-structure.
Example: C:\>TREE
Output: This command will display tree structure along with the of C drive disk.

DELTREE

Syntax: DELTREE
Use: Used to remove directory which is empty or non-empty.
Example: C:\> DELTREE C:\Nepal\.
Output: This command deletes all the files, sub-directories and lower sub-directories of director "Nepal" of C drive permanently with confirmation.

DISKCOPY

Syntax: DISKCOPY [source drive:] [target drive:] [switch]
Use: Used to make duplicate copy of a disk. While copying, both the disk must have equal capacity.
Example: C:> DISKCOPY A: B:
Output: This command allows us to copy the contents or A drive to B drive.

UNDELETE

Syntax: UNDELETE [filename]
Use: Used to recall deleted files.
Example: C:\> UNDELETE*. DOC
Output: This command starts recovering all deleted file whose extension is DOC from root directory C.

SYS

Syntax: SYS [drive:]
Use: Used to transfer system files from one disk to another.
Example: C:\>SYS A:
Output: This will be transfer system files from C disk to A disk drive.

ATTRIB

Syntax: ATTRIB [filename] [+/-] [H] [R]
Use: To change attribute and setting of files and directories.
Example: C:\> ATTRIB + H Suyash
Output: This command assigns the hidden attribute to a file with name Suyash.

Symbol Meaning
+ Sets an attribute
- Clears the screen
R Read only file attribute
H Hidden file attribute

CHKDSK

Syntax: CHKDSK [drive]
Use: To Check and display status report of any disk.
Example: C:\>CHKDSK D:
Output: This command checks drive D: for any errors and displays status report of a drive D.

LABEL

Syntax: LABEL [drive:] [path] [Label-text]
Use: Creates, changes and deletes volume label name of a disk.
Example: C:\>LABEL A:\SCHOOL
Output: This command deletes old volume label and creates the volume label SCHOOL for disk drive A staying at C drive.

DISKCOMP

Syntax: DISKCOMP [drive:] [drive 2:]
Use: Used to compare two disks.
Example: C:\>DISKCOMP A: B:
Output: This command will compare two floppy disks in the drive A and B.

EDIT

Syntax: EDIT
Use: Used to edit files.
Example: C:\>EDIT Suyasha.txt
Output: This command will open the DOS file Suyasha.txt and will allow us to edit.

EXIT

Syntax: EXIT
Use: Used to quit from MS-DOS program.
Example: C:\>EXIT
Output: This command allows us to quit from the DOS prompt.