Del (Erase)

Deletes specified files.

del [drive:][path] filename [ ...] [/p] [/f] [/s] [/q] [/a[:attributes]]

erase [drive:][path] filename [ ...] [/p] [/f] [/s] [/q] [/a[:attributes]]

Parameters

[drive:][path] filename

Specifies the location and name of the file or set of files you want to delete. Multiple file names can be used. File names can be separated by spaces, commas, or semicolons.

/p

Prompts you for confirmation before deleting the specified file.

/f

Forces deletion of read-only files.

/s

Deletes specified files from the current directory and all subdirectories. Displays the names of the files as they are being deleted.

/q

Quiet mode; does not prompt for delete confirmation.

/a

Deletes files based on specified attributes.

attributes

Can be any of the following file attributes:

Attribute Description
r Read-only
a Archive
s System
h Hidden
- Prefix meaning "not"

note Note

Windows 2000 Command Reference Main Page

Rmdir (Rd)

Cmd

Del Notes

Del Examples