Guides:Shells/COMMAND.COM-CMD.EXE/DOS Commands/DEL

From CoderGuide

Jump to: navigation, search

Return to: Guides:Shells/COMMAND.COM-CMD.EXE/DOS Commands

DEL, ERASE

This command has two names, and do exactly the same thing. "DEL" is used more often.

Format:

DEL file.ext
DEL .
DEL *.*

DEL *.* and DEL . both delete all files in the current directory. A single "." refers to the current directory, while *.* uses wild card characters (* and ?) to match all file names in the current directory.

After DOS 5.0, DEL began asking for confirmation of deleting files in an entire directory. You can tell DEL not to ask with the ***PUT FLAG HERE*** flag.

This command knows nothing about the "Recycle Bin" in Windows.

On Windows versions released after 1996, you can specify filenames with spaced by putting quotes, (Example: "file name.txt") around the file name.

Personal tools