1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-24 01:22:10 +02:00
tldr/pages/windows/del.md
Reinhart Previano Koentjoro bcdc05b986
windows/*: add PowerShell commands and aliases (#11227)
* windows/*: add PowerShell commands and aliases

* clear-host, new-item, remove-item: fix style

* psversiontable, remove-item: fix style

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2023-10-25 11:00:02 +02:00

911 B

del

Delete one or more files. In PowerShell, this command is an alias of Remove-Item. This documentation is based on the Command Prompt (cmd) version of del. More information: https://learn.microsoft.com/windows-server/administration/windows-commands/del.

  • View the documentation of the equivalent PowerShell command:

tldr remove-item

  • Delete one or more space-separated files or patterns:

del {{file_pattern}}

  • Prompt for confirmation before deleting each file:

del {{file_pattern}} /p

  • Force the deletion of read-only files:

del {{file_pattern}} /f

  • Recursively delete file(s) from all subdirectories:

del {{file_pattern}} /s

  • Do not prompt when deleting files based on a global wildcard:

del {{file_pattern}} /q

  • Display the help and list available attributes:

del /?

  • Delete files based on specified attributes:

del {{file_pattern}} /a {{attribute}}