DEL or ERASE
The DEL or ERASE command is used to delete a file or group of files.
- The ? and * wild cards may be used in file named in deletion command.
- This command can be used to delete files of another drive.
Syntax
DEL [drive:] [path] filename [ext]
where,
drive : drive containing the files to be deleted.
path : location of the file.
file name: name of the file (with extension) to be deleted.
ext : extension of file to be deleted.
Example 1
C:\>DEL CLASS9(press enter key)
It deletes the file CLASS9 of the hard disk(C: drive)
Example 2
C:\>DEL*.OPT(press enter key)
It is used to delete those files which have extension OPT.
C:\>ERASE*.*(press enter key)
It deletes all files of the root directory (C:\>)
It also prompts : Are you sure (Y/N)?
Press Y to delete,
Press N to cancel the command.
Note :Be careful while using this command it may delete your system files which you need to boot the computer.
C:\>DEL A:\COMPUTER (press enter key)
It deletes file COMPUTER of A : drive from C: drive.
C:\>DEL ?E ????.* (press enter key)
It deletes those files which have second letter E in their file name (e.g. TEACHER.OPT,TEACHER)
No comments:
Post a Comment