Del/ erase


With the del command it is possible to erase one or more files from the directory.


Example:

C:\>del text.bin


result:
The file text.bin in the directory C:\ will be erased.

If you want to erase more files, you can use a wildcard.


Example:

C:\>del *.exe


Result:
All files with the EXE extension of the directory will be erased.


Example:

C:\>del *.*


Result:
All files in the directory will be erased.

Instead of the del command, you can also use the erase command. If you cannot delete a file because it is protected, unprotect it with the attrib command.
If you want to erase a directory including a lot of sub directories, use the deltree command.

Sponsors