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.