del
Windows CMD · Files · available in the simulator · Also: erase
What it does
Deletes files.
Syntax
del [/p] [/f] [/s] [/q] [/a[[:]atributos]] nombre
Options and parameters
/fforces deletion
/salso deletes from subdirectories
/qquiet mode
/pprompts for confirmation
/a:Hhidden files only
/PPrompts for confirmation before deleting each file.
/FForces deletion of read-only files.
/SDeletes matching files from all subdirectories.
del /s *.tmp/QQuiet mode: does not prompt for confirmation on wildcards.
del /q *.tmp/ADeletes files based on specified attributes: H hidden, S system, R read-only.
del /a:h *.bak
Usage examples
del "c:\users\admin\desktop\mi foto.jpg"del sistemas\apuntes.txt /fdel c:\users\admin\*.txt /sdel archivo.tmpdel /q /s *.tmpdel /s *.tmpdel /q *.tmpdel /a:h *.bak
Notes and common mistakes
- erase is equivalent. Does not delete directories; use rd instead.