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.
migrated from stackoverflow.com Dec 9 '10 at 2:37
This question came from our site for professional and enthusiast programmers.
will delete the files. You'll need to do
for each subfolder.
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.