Auto delete empty directories with One-line batch script

Raymond Chen, the Microsoft coder, explains that you don't need a whole 260KB program to automatically delete empty subdirectories. You can create a single line batch file that will do exactly what you're looking for: for /f "usebackq" %%d in ("dir /ad/b/s | sort /R") do rd "%%d"

Raymond Chen, the Microsoft coder, explains that you don't need a whole 260KB program to automatically delete empty subdirectories. You can create a single line batch file that will do exactly what you're looking for:

for /f "usebackq" %%d in ("dir /ad/b/s | sort /R") do rd "%%d"