1. Home
  2. Windows Tips
  3. Find empty folders on windows 10

How to find empty folders on Windows 10

Windows 10 has a tool that lets you view disk space usage by folder. It’s in the Settings app and if you ever need to free up space on your hard drive, it’s a good place to start looking for what you need to clean up. Where large, useless files hog space, empty folders tend to create problems when you’re trying to find a file. Here’s how you can find empty folders on Windows 10.

Find empty folders

It’s pretty easy to find empty folders on Windows 10. You can run a simply command in PowerShell and it will list all the folders for you. The command can be run on an entire drive, or on a specific folder.

Open PowerShell and run the command below;

$SomePath="C:\Users\fatiw\Desktop"

Get-ChildItem -Path $SomePath -Recurse -Directory | ForEach-Object -Process {
if ($false -eq $_.GetFileSystemInfos())
{
$_.FullName
}
}

You have to edit the first line of the above command to suit your needs. In the first line, replace the path closed in the commas with the path to the folder you want to scan.

Examples:

To scan your entire C drive;

$SomePath="C:\"

or

To scan the Steam library saved to the D drive;

$SomePath="D:\SteamLibrary"

or

To scan a user folder;

$SomePath="C:\Users\YourUserName"

The command will return a list of all empty folders in the specified location. The list will include the path to the folder. It will not delete or move anything. If you want to get rid of one of the folders, you can do so via PowerShell but it’s easier to delete them from File Explorer.

If you run this command on an entire drive, it might take longer to complete especially if you run it on your Windows drive however, it still scans fast and it is much better than using a clunky, or even a well-made tool to find empty folders on Windows 10. If you do use a tool, use one to delete the folders but as far as running a reliable scan goes, you can use PowerShell without any problems.

It’s worth pointing out that you do not need admin rights to run this command however, if you’re running it on your Windows drive, you should run it with admin rights or it will not be able to scan certain folders which are protected by the system. It’s possible that even with admin rights, the command cannot scan certain folders for empty folders. In this case, it’s best to leave those folders alone. They may be empty but your OS created them and may need to use them for something. If you delete the folders and later forget that you did, you might end up with problems and no way to figure out what went wrong.

2 Comments

  1. Woooow, so awesome Ms Fatima, I was able to search all my drives and remove the empty folders/subfolders. Would it possible to know if you can write a power shell command to delete the empty subfolders or is it dangerous to delete them without reviewing them first to makes sure they are not in the Windows directory?

  2. Just full of nice techie talk read (foreign language). Is there a place one can go to find missing drive letters and recover them for use?

    Went to explorer>organize>folder and search>view. Could not find a box to uncheck for “hide empty folders”.

    Just for grins its Windows 10 home that I’m using.

    Any help appreciated!!!!!!!!!!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.