How to delete all folders in current directory using command line (cmd.exe) or batch files?
How to delete all empty directories in current folder:
FOR /D %f IN (*.*) DO RD "%f"
How to delete all directories / folders in current directory / folder:
FOR /D %f IN (*.*) DO RD "%f" /S /Q
If you are using FOR in batch file, you must use double % signs.
FOR /D %%f IN (*.*) DO RD "%%f" /S /Q