The tool you need to use will depend on the command console if you want to delete folders with content inside of them. If you use Command Prompt, rmdir (remove directory) is the tool you want to use to delete folders recursively. On the other hand, if you are using PowerShell, Remove-Item is the cmdlet that will do the job. This guide will teach you two ways to delete subfolders with Command Prompt and PowerShell on Windows 10.

Delete folders with subfolders from Command Prompt Delete folders with subfolders from PowerShell

Delete folders with subfolders from Command Prompt

To delete a folder with subfolders with a command on Windows 10, use these steps: Once you complete the steps, the command will delete the folders with subfolders and files from Windows 10. In the command, replace PATH\TO\FOLDER-NAME with the folder path and the folder name you want to delete. This example removes the “files” folder:

This example removes the “files” folder, subfolders, and files:

This example removes the “files” folder, subfolders, and files without prompting for confirmation:

The /s option deletes the folder and its content in the above command, but it prompts confirmation. The /q option ignores the prompt and deletes the folder recursively.

Delete folders with subfolders from PowerShell

To recursively delete an entire folder with a PowerShell command on Windows 10, use these steps: After you complete the steps, the command will delete the folder on Windows 10 and its contents with or without a prompt, depending on the command you choose. In the command, replace PATH\TO\FOLDER-NAME with the folder path and the folder name you want to delete. This example removes the “files” folder:

This example removes the “files” folder:

The -Recurse option tells the command that you want to delete the folder and its contents without prompt confirmation. The -Force option is not required but allows for erasing special items, including read-only or hidden files. All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.