How to Delete Old Folders in Windows CMD

Although almost all Windows file operations are carried out through Windows Explorer, in some cases you may need to carry out operations at a Windows command prompt working in DOS mode. This is especially relevant if your computer will not boot, and you need to use the Windows recovery mode. To remove folders from the command prompt, the "rd" command is used, which is short for remove directory. When the command is run it will delete the chosen directory and any files or folders it contains.

Step

Click on the Windows "Start" button and select "Command Prompt" from the "Accessories" menu to start the Windows command prompt.

Step

Change to a directory outside of the directory you are going to delete; otherwise the directory will be locked, and you will not be able to remove it.

Step

Type "rd \path\to\directory /s", replacing "\path\to\directory" with the path to the directory you want to delete, for example:

Step

rd C:\myDirectory /s

Step

This will remove the directory "myDirectory" from the C driver. The "/s" switch tells Windows to remove the contents of the directory if it's not empty.

Step

Press "Y" to confirm, and the folder and all of its contents will be removed.