Dec 16, 2024 • Filed to: Recover Files • Proven solutions
Learn to Delete Empty Folders in Windows like a pro.
If you have a working habit like myself,
I create many folders projects - but have little time to follow through and see if I completed everything.
Besides, everyone appreciates a neat desktop one with smartly named folders and files by extension. While creating new folders is easy, maintaining them is not a task most of us do best, and that includes your ability to do away with empty folders.
You are required to master one skill - How to remove empty folders in Windows.
Creating folders in windows is easy, but maintaining them can be an uphill task.
This post will walk you through the tweaks you need to master managing folders/directories.
A manual search for empty folders acts like any other search on your computer. However, you have to be very clear regarding the size of the folder (It has to be zero bytes - nothing stored in it)
Steps: This is a Manual way and very useful when done right
Specify The folder search size to be 0 for the empty folders
Using the command prompt to delete empty folders is an effective way. The downside with it is its technical bit. Not everybody can navigate through with ease. Nonetheless, here are the handy steps:
Pro-Tip: the EMPTIES.BAT command sorts all folders by the memory-size in reverse order.
This method may seem complicated, but it is instrumental since it peruses into sub-folders.
You enumerate and delete all empty folders using CMD internal commands for and rd. This is specific and deletes only the empty ones.
Press and hold on the Shift key. Next, right-click on a target folder and select the option Open command window here. N/B The command opens the CMD console reading the path to the folder you prompted it to open from.
Pro-Note: Ensure to launch the CMD console from the folder where you target to sort out for empty folders (and sub-folders for deletion)
Once you’re in the desired directory in the Command Prompt, run this command-line:
The command will delete all folders that are empty within directories and across subdirectories right form your base folder path (that includes any nested empty folders)
Another Handy Tip: If you want to run the command within any batch file, ensure you replace %i with %%i. Secondly, the command omits the deletion of folders whose names have special characters
One major disadvantage with the method arises from its failure to find the empty folders without their deletion.
To attain the subject, you’ll be required to deploy the following command via the CMD console:
for /r "D:\uploads\2019" /d %F in (.) do @dir /b "%F" | findstr "^" >nul || echo %~fF
Below is the output showing all empty folders/directories after running the above command.
Using Robocopy to Find and Remove Empty Folders
Robocopy is a handy and built-in tool with an array of advanced features.
Assume we have a folder by the name sam, and in it are sub-folders, some of them. Let’s go about deleting the empty folders using Robocopy.
Pro-Note: The whole idea using the Robocopy move command is using the same folder path containing the "source" and the "destination."
robocop "d:\automobile rates\cars" "d:\automobile rates\cars" /S /move
Remember, the source and destination paths are the same-(deliberately) the same. Therefore, the /S parameter directs Robocopy not to use the target "destination" path. Since both are the same, Robocopy will effect a delete action for all the empty folders. That arises from the /S switch.
See the above- all empty folders in the target path/directory all get cleared.
Let's do it practically.
Look at my %APPDATA% folder; usually, it's full of empty folders arising from outdated software.
Looking at the properties, the folder- Roaming has 3,629 folders.
Pretty sure some are empty.
Next, I effect the command” robocopy "%appdata%" "%appdata%" /S /MOVE”
The folders moved from 3,629 to 2,993
One more helpful solution delete empty folders is a Registry cleaner..
It's a tool for wiping out redundant folders that accumulate over time.
If you look online for registry cleaners, you'll get many. But, here is a list of six best ones.
In case this is your firs time using a registry cleaner, here are useful tips:
Finally, check to see if the empty folders have been deleted.
Everyday, computer users lose data due to many incidences and accidents.
Could be power outages, pure negligence or malfunction f the computer.
Whichever your case is, there's amazing opportunity to recover everything you've lost.
Here's the magical software to turn things around with data loss - Recoverit Data Recovery
In very precise words, Recoverit brings simplicity into the complex situation with data recovery.
Recent Videos from Recoverit
View More >And it cover you for both Mac and Windows
Step 1: Select a location to scan
Step 2: Scan the location
Step 3: Recover and save files
Users cannot run away from the creation of folders in a windows PC. The programs running locally and downloads create and leave empty folders.
It's a process you cannot escape from. The best way to go about it is to create time to clear the folders from time to time.
You can clear the empty folders manually. But, do you have the time?
The situation complicates when you are working with several client or servers. It's worst if you are working on remote PCs/servers.
You should not fear erasing empty folders and files from your PC. Keep in mind that, ordinarily deleting seemly moves the folders/ files into the recycle bin.
Over time, you get the need to recover a folder or two. And that is where Recoverit Data Recovery software comes in. With Recoverit in the picture, you can delete empty files and folders to optimize the storage and performance of your PC.
And anytime you require data recovery, Recoverit covers you.
Do empty folders take up space?
How do I delete empty folders in windows that won't delete?
Can I delete empty folders in Android?
How do I force delete a folder?
Some instances are annoying when you feel the folder is easy to delete until you instruct the PC, and it seems hard to delete. First, to force-delete a folder, you can launch the CMD console and navigate to the folder location and use the Del command.
On a second note, you use a freely available program, the Unlocker. It helps unlock locked files. Unlocker is simply invoked by right-clicking on its sub list options that show-up via Windows explorer.
Eleanor Reed
staff Editor