How dow I remove 1.000.000 directories?
- by harper
I found that in a directory more than 1.000.000 subdirectories has been created due to a bug.
I want to remove all these directories, let's say in the directory WebsiteCache. My first approach was to use the command line tool:
cd WebsiteCache
rmdir /Q /S .
This will remove all subdirectories except the directory WebsiteCache itself, since it is the current working directory.
I noticed after two hours that the directoriws starting with A-H have been removed.
Why does rmdir removes the directories in alphabetical order? It must take additional effort to do this ordered.
What is the fastest way to delete such an amount of directories?