One-line batch file to delete empty directories

April 22nd, 2008
for /f "usebackq" %%d in (`"dir /ad/b/s | sort /R"`) do rd "%%d"

Who knew it was so easy?

From The Old New Thing, by Raymond Chen.