How To Batch Delete Empty Folders in Windows

After using your Windows computer for a few years, installing and uninstalling software, you’re bound to find a lot of empty directories. Hunting them down and deleting each individually can be very annoying. Here we look at a free utility that will find empty folders for you and delete them all in one shot.

Here we take a look at the Admin Edition which forces you to start it as Administrator every time if you haven’t disabled UAC. There’s also the Normal Edition – (Recommended for most users) that works without Admin rights but can’t clean some directories. Both are free and work virtually the same.

1. Install the Remove Empty Directories program by accepting the wizard defaults.

sshot-2011-03-07-[23-27-10]

2. When installation is complete, you can run the utility right away.

sshot-2011-03-07-[23-28-17]

3. The Scan tab will be open by default, now select a directory, then click the Scan folders button.

sshot-2011-03-07-[23-36-19]

4. Then wait while it scans your drive for empty folders. The amount of time it takes will depend on the amount of data you have on your drive.

sshot-2011-03-07-[23-36-38]

5. When the scan completes, you’ll be shown the number of empty and the amount of time it took…in this instance it was less than a minute. The results are shown in a hierarchical tree and are color coded based on their description.

sshot-2011-03-07-[23-36-38]

6. After the initial scan, I didn’t remove anything…but went into the settings where you have more control over how the scans take place.

sshot-2011-03-07-[23-39-05]

7. After running a scan again, it took a fraction of the time, and there were less empty directories found because I selected to ignore hidden folders.

sshot-2011-03-07-[23-40-28]

8. Before deleting the folders, you’ll probably want to go through the results to see what it’s going to delete. Then you can right-click on the empty directories and open them in Explorer, scan only that directory, protect or unprotect it and more.

sshot-2011-03-07-[23-43-30]

Of course if you open a folder that it finds it should be empty.

sshot-2011-03-07-[23-44-36]

9. When you’re ready, click the Delete Folders button and wait for the process to complete. Here you can see a few directories failed to delete because they’re protected by the file system…for more information you can pull up the Log which is a text based file.

sshot-2011-03-08-[01-20-55]

sshot-2011-03-08-[01-57-44]

10. The empty folders are put into the Recycle Bin, just empty it to get rid of them.

sshot-2011-03-08-[01-21-45]

If you’re a fan of knowing what’s in your folder tree and hate programs that leave empty folders cluttering up your system after they’re uninstalled, you might want to give Remove Empty Directories a try.


Home » Windows » How To Batch Delete Empty Folders in Windows

1 thought on “How To Batch Delete Empty Folders in Windows”

  1. 66 bytes is all you need for this job :)

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

Leave a Comment

Your email address will not be published. Required fields are marked *