Reputation: 673
I tried to delete a folder, so I tried 'DEL "%Folder%"'. That left the folder itself behind, and deleted all files within the folder. Then I typed DEL /? into the cmd prompt and read "If a directory is specified, all files within the directory will be deleted." So, what do I have to do to delete the folder itself?
Upvotes: 0
Views: 129
Reputation: 5067
I suggest using RD or RMDIR commands. A more detailed usage description here.
Syntax:
RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path
Upvotes: 2
Reputation: 111
You can try using RMDIR "%Folder%"
to remove the directory (and sub directories with /s
if desired).
http://technet.microsoft.com/en-us/library/bb490990.aspx
Upvotes: 2