2018-01-28 12:10:59 +00:00
|
|
|
# rmdir
|
|
|
|
|
|
|
|
> Remove a directory and its contents.
|
2023-10-25 10:00:02 +01:00
|
|
|
> In PowerShell, this command is an alias of `Remove-Item`. This documentation is based on the Command Prompt (`cmd`) version of `rmdir`.
|
2022-10-04 16:06:23 +01:00
|
|
|
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/rmdir>.
|
2018-01-28 12:10:59 +00:00
|
|
|
|
2023-10-25 10:00:02 +01:00
|
|
|
- View the documentation of the equivalent PowerShell command:
|
|
|
|
|
|
|
|
`tldr remove-item`
|
|
|
|
|
2018-01-28 12:10:59 +00:00
|
|
|
- Remove an empty directory:
|
|
|
|
|
2023-02-20 07:23:49 +00:00
|
|
|
`rmdir {{path\to\directory}}`
|
2018-01-28 12:10:59 +00:00
|
|
|
|
|
|
|
- Remove a directory and its contents recursively:
|
|
|
|
|
2023-02-20 07:23:49 +00:00
|
|
|
`rmdir {{path\to\directory}} /s`
|
2018-01-28 12:10:59 +00:00
|
|
|
|
|
|
|
- Remove a directory and its contents recursively without prompting:
|
|
|
|
|
2023-02-20 07:23:49 +00:00
|
|
|
`rmdir {{path\to\directory}} /s /q`
|