How To Remove Empty Directories In Windows 10

Over time as you use your system, Windows gets cluttered with more and more junk data and hundreds of empty folders. These files occupy unnecessary space but using the best disk cleanup and PC optimizer tool they can be cleaned up. Yet, empty directories and empty folders do remain and they make organizing data bulky. So, if you are looking for a way to get rid of these empty directories and folders, this article is just right for you.

In this post, we will discuss both manual and automatic ways to delete empty directories that are left behind, generally after uninstalling a product. If you have the right tool, removing these directories is not at all difficult but if you are thinking of sifting through each folder to find these empty folders then it can take forever and you will not be able to find them all.

How To Delete Empty Folders And Directories

1. What Is An Empty Directory/Folder And How To Find It In Windows 10?

An empty folder or directory is one without a sub-directory or files in it. Though these files don’t occupy disk space, they can create annoyance. Hence, if you don’t want this unwanted data on your Windows, read further and learn how to search and remove an empty folder/directory – Windows 10.

Tip: Before deleting a file or running a batch file to delete empty folders/directories, we suggest backing up data on an external drive.

  1. Manually searching for empty folders
  2. Double-click This PC.
  3. Hit Search Tab, this will open the Search Menu.
  4. Click the Size option and select the Empty filter. When doing so, ensure All subfolder features are checked.
  5. Wait for the search to finish, you will now see all empty folders and directories that do not take space but do clutter the system.
  6. Select folders/ directories that you don’t want > right-click >

To use this manual method, you don’t need third-party software, as the search is based on size. But this method searches only at the system level. This means using this step on a surface level, you can get rid of empty folders or directories. However, if you are looking for a thorough and more effective way, then we suggest using Advanced System Optimizer. This tool will not only help detect and delete these files but will also help fix invalid registry entries and do a lot more.

2. Removing Empty Directories using Third-Party Tools –

If you cannot find the empty folders on your computer manually, you can always get help from third-party software. Here we recommend you to use Duplicate Files Fixer, which can quickly Delete Empty Folders on command. Duplicate Files Fixer is a powerful tool to remove duplicate files from your computer. It has a robust scanning engine that can also look up the Empty directories on your computer and then delete them.

Step 1: Download Duplicate Files Fixer on your computer using the download button below.

Step 2: Complete the installation and launch the application. Go to the Scan Mode in the bottom-right corner and select Delete Empty Folders from the dropdown menu.

Duplicate Files Fixer

Step 3: It will open a new tab where you must add the Scan location using the Browse button.

Scan location

Step 4: Once you have added the location, click the Scan Folders button.

added the location

Step 5: Duplicate Files Fixer will immediately run a thorough scan for all the empty directories and present a result.

Duplicate Files Fixer

Step 6: Now, simply click on the Delete Folders button to remove empty directories in Windows 10 or other versions.

Delete Folders button

Additionally, it comes with an Undo button which can save you from accidentally deleting any directories. You can reverse the action of deleted directories using it by clicking on it and getting back the Deleted directories.

3. Removing Empty Folder Using Command Prompt

Using elevated Command Prompt and running commands like for and rd, you can list down and delete empty folder/directories. To learn how to do that, follow the steps below:

  1. In the Windows search bar, type Command Prompt
  2. Select the search result > Run as administrator
  3. Here, type for /f "delims=" %i in ('dir /s /b /ad ^| sort /r') do rd "%i" 2>NUL


for /f "usebackq delims=" %i in (`"dir /s /b /ad | sort /r"`) do rd "%i" 2>NUL

Note: Before you run this command, make sure you are in the correct directory. Once that is cross-checked, only then run the command. Moreover, to run the command as a batch file, replace %i with %%i.

  1. Wait for the command to run.
  2. Once done all the empty directories and subdirectories will be removed from the base folder path, including empty folders.

Note: If there are any folders with special characters, the above command will not work on them. Also, the command automatically deletes empty folders/ directories. This means if you want to check the list of empty folders before they are removed, you cannot.

In addition to this, if you are an advanced user, you can run DIR /AD/B/S | SORT /R > EMPTIES.BAT file to remove empty folders.

Again, to run this command, you need to use an elevated Command Prompt. Also, EMPTIES.BAT contains a list of folders in reverse order. Once you have the list, you can use an editor like Word to find the files and replace files.

To do so, open the word editor press Ctrl + F, and enter ^p as search criteria replace it with ^pRD. Then save the EMPTIES>BAT file and exit

Now run the BAT file to delete all empty folders.

Note: This method is a bit complex. So, if you are not sure you can skip it.

4. Removing Empty Folder, Invalid Registry Entries Using Advanced System Optimizer

An excellent and powerful PC Optimizer can help delete redundant files and junk data if it has a registry cleaner and optimizer. So, try Advanced System Optimizer if you have been just using a PC cleanup tool without a registry cleaner. This best PC Optimizer offers registry cleaner, the best way to remove empty directories, and boost the system’s performance. To use it, follow the steps below:

1. Download, install and run Advanced System Optimizer.

2. Launch the tool > select Deep Scan and click Start Smart PC Care. Wait for the operation to perform.

Advanced System Optimizer

3. Once done, click Clean Now to repair all detected errors and fix invalid registries. This way, you can remove empty directories and folders easily.

To know more about this robust tool, read the comprehensive review on Advanced System Optimizer.

Wrapping up –

Using these simple steps, you can easily remove empty folders/directories from Windows 10. In addition to these steps, you can also use PowerShell and Windows Scripting. But both these methods are complex, and only advanced users can use them. Hence, we haven’t explained it to them. If you want us to explain them, drop your message in the comments section. We hope you like the post and found it useful. If you like it, share it with others who need help.

In the end, an additional tip.

You might face problems if you are running the system as a guest user without admin rights. To remove empty directories and folders, you need to ask the owner for admin rights. Once you are using the Administrator account, you can remove the unnecessary folders. There you go; you have learned how to delete empty directories and folders.

We hope the article was helpful for you in learning how to remove empty directories in Windows 10. We would like to know your views on this post to make it more useful. Your suggestions and comments are welcome in the comment section below. Share the information with your friends and others by sharing the article on social media.

We love to hear from you!

Let us know of any queries or suggestions. We love to get back to you with a solution. We regularly post tips, tricks, and answers to common technology-related issues.

Related Topics – 

How To Clean Junk Files With Advanced PC Cleanup

How To Recover Deleted Restore Points In Windows 11/10

10 Best CPU Benchmark Software For Windows 2022

How to Fix Slow Internet Speed Issue on Windows 11?


  • comment_avtar
    Most of the time we dont know about such directory and dont have any option and tricks to delete them or remove them but this process help me a lot.

    4 years ago

Leave a Reply

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

Subscribe Now & Never Miss The Latest Tech Updates!

Enter your e-mail address and click the Subscribe button to receive great content and coupon codes for amazing discounts.

Don't Miss Out. Complete the subscription Now.