What commands can I use (from the command prompt) to delete all files and all subdirectories from a folder, but not delete the folder itself? Basically at the end of the delete, there should be an empty folder.
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
migrated from stackoverflow.com Dec 9 '10 at 2:37
will delete the files. You'll need to do
for each subfolder. Update Try this in a batch file:
Call it something like EmptyDir.bat. Then you can type:
and it will delete the files and folder in that folder, but leave the folder there. |
|||||||||||
|