Quincy Center for Technical Education
Computer Technology Department

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

  • If you disable command extensions (the default in Windows 2000 is to have command extensions enabled), the /s switch is reversed so that instead of displaying the names of files that are being deleted, it displays the names of any files that were not found.