How to Find and Remove Empty Directories? Here Are 3 Ways

It might be frustrating that when you open the subfolders one by one but it turns out empty. Such folders and files might be everywhere on your PC. Most of them are useless and won’t take up any disk space, but you might be annoyed if there are thousands of empty folders or files across your system.

Is it safe to remove empty directories?

Generally, it is safe to delete some of the empty folders or files. For example, you can remove the folders or files from uninstalled program files folders. Of course, if these empty folders are created by yourselves, you can remove them without any worries.

However, some empty folders or files are required by working software or Windows operating system, which means you should not delete them.

How to find and remove empty directories on Windows 10? Here are some methods for you.

Method 1: Use the Search Feature in File Explorer

Of course, you can search for empty directories with this tool. This method is quite easy to operate and here is the tutorial for you. But you can only get empty files from the search results and empty folders won’t be displayed here. If you are looking for empty folders, you might need to try another method.

  • Empty (0 KB)
  • Tiny (0–16 KB)
  • Small (16–1 MB)
  • Medium (1–128 MB)
  • Large (128 MB — 1 GB)
  • Huge (1- 4 GB )
  • Gigantic (> 4 GB)

Step 5: To search for empty directories, you need to select Empty (0 KB). It might take some time during the searching, and you should wait patiently until it is finished. Then you can delete the empty files according to your needs. By the way, you should make sure you are not opening or using the files you want to delete. Otherwise, you are unable to remove them.

Method 2: Use Command Prompt to Remove Empty Directories

Command Prompt is not commonly used and it’s risky to use this tool if you are not familiar with it. However, for advanced users, Command Prompt is a powerful tool that can be used to repair some problems and manage the PC.

You can use this tool to delete empty folders from the command line or batch scripts. To remove empty directories, you should follow the steps below.

Step 1: Run Command Prompt as administrator.

Step 2: Type the following commands and press Enter after each to change directory and navigate to the drive where you want to delete empty folders:

  • cd \ (to go to the root level directory from the current directory)
  • g: (replace the letter g with another letter that represents the target drive)

Step 6: Make sure every line has been added RD before them, especially the first and last lines. Then save the file and exit the editor.

Step 7: Double-click the EMPTIES.BAT file to run it. Then the empty folders or the folders that contain only empty subfolders will be deleted automatically. You should know that the directory won’t be deleted if it’s not empty. Empty files won’t be deleted either.

Are you looking for a way to find empty subfolders and delete them? This post might be helpful! Click to tweet

Method 3: Use a Third-party Program to Remove Empty Directories

Fortunately, if you don’t like the above methods, there is another option for you: using a professional third-party program.

Here I recommended MiniTool Partition Wizard, a powerful and professional disk manager with a user-friendly interface. You can use it to manage your partitions, recover data, and test your disk performance. It can also help you find empty files and folders within a few clicks via the Space Analyzer feature.

Compared with the File Explorer and Command Prompt, the Space Analyzer feature of MiniTool Partition Wizard provides optional Folder View and File View while analyzing what’s taking up space on your disk. In this way, you won’t miss any empty folders or files. Now, let’s see how to use this tool.

Step 1: Download and install MiniTool Partition Wizard by clicking the button below and following the onscreen instructions.

Step 2: Launch the program and click Space Analyzer from the toolbar when you get the main interface.

Step 3: In the following window, select the target drive where you want to delete empty folders and files. Then wait patiently while it’s analyzing disk space usage.

Step 4: By default, MiniTool Partition Wizard will show the Tree View which would be harder to find empty subfolders. To find your empty files or folders quickly, you can choose File View or Folder View. After selecting the view type, you can click the Size button which makes your folders or files be categorized by size. The empty ones will be marked with 0 B.

How to remove empty directories on Windows 10? Here are three methods. All of them have their pros and cons, and you can choose the one you prefer according to your own needs. Click to tweet

Bottom Line

File Explorer is easy to use and you can delete a huge number of files at once, but you can’t search for empty folders.

Command Prompt is relatively hard to operate but it is effective to remove empty directories (folders with only empty subfolders).

MiniTool Partition Wizard is easy to operate and you can find all your empty files and folders, but you need to delete them one by one, which may cost you some time.

You can share your experience with us in the following comment zone. And for any problems with MiniTool Partition Wizard, you can contact us via [email protected] .

Remove Empty Directories FAQ


Sherry has been a staff editor of MiniTool for a year. She has received rigorous training about computer and digital data in company. Her articles focus on solutions to various problems that many Windows users might encounter and she is excellent at disk partitioning.

She has a wide range of hobbies, including listening to music, playing video games, roller skating, reading, and so on. By the way, she is patient and serious.

Originally published at on December 16, 2020.