Saturday, September 3, 2011

Removing Empty Folders In Command Prompt

For a quick way to batch remove all empty folders, "cd" into that folder and perform the following:

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

Please backup the source folder before doing so, just in case.  Afterwards, you can use beyond compare and order by folder size to compare the results.

No comments:

Post a Comment