Over time your Windows installation gets cluttered up with more and more data. While many of the files are important for the running of the system, some are useless and get left behind by software that has been uninstalled. The files and folders are therefore redundant but still on the system. As more and more is added to the operating system, it begins to slow down which is partly why an old install runs slower than a newer install.
Although folders by themselves don’t really cause any performance issues or take up any space, having thousands of folders spread across your system that don’t contain any files can become a bit of a pain. For the most part, they are of no practical use and just get in the way, especially while using Windows File Explorer. It’s frustrating to drill down through folders to find what’s in them only to discover they are completely empty and are serving no purpose. Here we list 7 Windows based tools that can find and delete empty folders from your system. While many empty folders are of no use and can be safely deleted, others are required by software or Windows itself. It is never recommended to just mass delete all empty folders from your system drive and some experience is required to determine what is safe to remove and what isn’t.
Delete Empty Folders Using a Third Party Program
Using a separate tool to delete a number of empty folders is going to be much faster and easier than trying to do it yourself manually. Here are some tools to look at.
1. Remove Empty Directories
Remove Empty Directories is probably the most well known empty folder deleting tool, but like many others, it hasn’t been updated in several years. The last update for this program was 2011. It still works great though, has enough functions for most users and manages to squeeze everything into a portable executable under 200KB in size.
After selecting and scanning the base folder or drive, the view will be populated with a tree view containing different colored text and icons. The icon list on the right will tell you if the folders are truly empty, contain trash files and are hidden, locked or can’t be read. Names in red are automatically marked for deletion. Right click on a red empty folder and select “Protect once” to ignore it for this session or “Add to ignore list” to permanently ignore the folder in future.
In the the Settings tab you can choose to delete to the Recycle bin or directly, skip predefined folders (7 are already added), add or remove what are classed as trash files (3 are pre entered), add a right click menu entry to Explorer, and set a few advanced options like recursive depth. Right click and run the program as administrator to enter Admin mode and allow deleting of protected folders.
EmptyFolderNuker is probably the easiest GUI based empty folder remover here. It’s a bit old dating from 2007, and the official website is no longer there but the tool still works as intended, even in Windows 10. The program is also a single portable executable.
Browse for the folder or drive you want to check, then press the Find button. Make sure the two boxes are checked to scan the path recursively and treat folders as empty if they contain only empty folders. The Shell Integration box is useful and places a right click “Find empty folders” entry when you right click on a folder. The program will then open with the folder you clicked on as the base path.
You need to be slightly careful at the results window as all empty folders are pre-checked for deletion. It’s recommended to press Uncheck All and choose the folders selectively or go through the list and make sure to uncheck any folders you want to leave alone. After you press Delete, a UAC prompt will pop up if any folders require administrator privileges to remove.
3. Fast Empty Folder Finder
Like Empty Folder Nuker, this tool is quite old and its official website is no longer around. Fast Empty Folder Finder is a bit newer though and from 2011. The .NET Framework v2 is required so Windows 8 and 10 users will need to have the .NET 3.5 optional feature installed. Besides the .NET requirement, Fast Empty Folder Finder is portable.
When you press the Scan Locations button to add a folder, several different base folders can be added at once. This is useful and can stop the program scanning thousands of folders you are not interested in. After pressing Scan Now! select all the empty folders you want to remove using left click, Shift+click or Ctrl+click or use the List > Check menu options. Checked files can be deleted permanently or to the Recycle bin for a bit of added safety.
Although the lower pane Explorer window might be useful to check if a folder is really empty, it is mostly unneeded and can be turned off from the View menu. Empty folder lists can be exported to a text file for later use. One issue is Fast Empty Folder Finder doesn’t delete a folder if it only contains empty folders. If you have a path of foldera\folderb and both folders contain no files, only folderb will be deleted.
4. 4dots Empty Folder Cleaner
Empty Folder Cleaner by 4dots Software has both installer and portable versions available. The only major difference between the two is the installed version has the option to add a right click context menu entry so you can delete empty folders from the folder you right click on.
After selecting a drive or folder to scan and scanning it, you then have the opportunity to delete completely empty folders or those that contain what are considered “junk” files. By default, junk files are desktop.ini, thumbs.db and .tmp files although you can add to or edit this list in the program’s options. Press either the green or blue buttons to select all empty or junk folders or selectively check the boxes for individual folders.
You can also add folders to ignore (5 system folders are already included), folders and files to protect from deletion, and keep backups of the deleted folders for later restoration. To enable the backup option go to Tools > Options and select Keep Backups. The program will ask for administrative privileges after you press the delete button if administrator protected folders are listed for deletion.
Note: Some tools were ineffective in finding the real number of empty folders on our system. The tools above found thousands but Advanced SystemCare Free only found 23 empty folders and Puran Delete Empty Folders found just 7. You are welcome to try these programs but we found they were nowhere near thorough enough to be considered truly useful.
Delete Empty Folders From the Command Line or Scripts
Letting a dedicated program find and delete empty folders is the best choice for users of all skill levels. Advanced users might also want some extra options like being able to delete empty folders from the command line or batch scripts. Here are a few ways to do that using third party command line and built in Windows utilities.
5. DelEmpty (by Intelliadmin)
There is another tool called DelEmpty that has a GUI but this one is made solely for the command line. The main arguments to remove folders and subfolders from a given path are:
delempty -S -D [-Y] [-L] pathtofolder
The -D argument is required and tells the tool to delete empty folders, the -S will optionally include sub-folders. Two other useful arguments are -Y which requires confirmation to delete each folder and -L lists the folders to be deleted without deleting anything. This is useful if you want to redirect the folder list to a text file. DelEmpty is also able to delete zero byte files by including -F, run the tool without arguments for a list.
For complete ease of use while deleting empty folders from the command line, this old tool from around the year 2000 is about as simple as it gets.
RmEmpty pathtofolder [pathtofolder2]
Supply at least one folder as an argument and RmEmpty will search the path recursively and delete empty folders. Multiple path arguments can be included so you can delete from several different base folders at once.
7. Windows RoboCopy Command
There are several different ways in which you can delete empty folders using built in Windows commands, most require the use of a For loop. The Robocopy (Robust File Copy) tool is much easier and a simple trick forces it to remove all empty folders in the given path. Robocopy is available as standard in Windows Vista and above.
Robocopy pathtofolder samepathtofolder /S /Move
Instead of supplying a different source and destination folder you simply use the same for both. The addition of /Move tries to move the files from and to the same location, so Robocopy skips them. The extra /S argument forces Robocopy to also move subfolders but not empty folders. Only the empty folders are processed and deleted while everything else is skipped because it already exists. This leaves all files and non empty folders completely intact.
Note: These tools need to be run in an administrative Command Prompt or the script needs running as administrator for all folders to be processed on the C drive. Otherwise only those empty folders inside the current user’s folder will be deleted and those outside (such as in Program Files) will receive an access denied error message.