Tuesday, 23 July 2013

Delete Directory and Contents using DOS Command Prompt

Open Command Prompt and enter the following, replacing path between quotes with path to folder to delete.
RD /S /Q "C:\Users\UserName\Desktop\Folder"
Switches:
/S Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S

No comments:

Post a Comment