How to find empty folders in Windows 10

It can happen to anyone to create empty folders and then leave them in oblivion. Empty folders can create quite a few problems, especially when trying to search for a file lost in the maze of internal memory. Fortunately, Windows 10 comes with a handy tool that allows you to find empty folders inside your computer’s memory. In this way, you can eliminate them permanently in no time. In this guide we will explain how to find empty folders in Windows 10 in a few steps.

Find empty folders with Windows PowerShell

Finding the empty folders in Windows 10 is an operation that will take a few minutes of your time. All you have to do is run a specific command using the Windows PowerShell. The command can be executed for an entire unit or for a specific folder, in order to facilitate the search for empty folders.

First of all, you have to open the affected software. Right-click on the Start menu and click on the Windows PowerShell entry. In the new screen, you need to copy and paste the following command:

$SomePath="C:\Users\User Name\Desktop"
Get-ChildItem -Path $SomePath -Recurse -Directory | ForEach-Object -Process {
if ($false -eq $_.GetFileSystemInfos())
{
$_.FullName
}
}

You need to change the initial string with the path to the folder or drive you decide to scan. For example, if you want to control the entire C drive, you will need to replace the first line of the command with the string $ SomePath = “C:”. To restrict the search to a specific folder instead, you will need to specify the full path to the folder. For example, to scan the Steam folder, the line to insert is  $ SomePath = “C: Program Files (x86) Steam”.

The command will return a list of all empty folders with their specific location. This means that, thanks to the path provided in the list, you can identify and delete the folders found. The command used does not automatically delete the empty folders provided in the list. You can delete folders directly from Windows PowerShell, but for novice users it is recommended that you delete them from the File Explorer.

If you run this command on an entire drive, scanning may take much longer than a specific folder. Also, it is not necessary to have administrator permissions to be able to scan. However, to be able to detect the folders protected by the system, you must run the Windows PowerShell as an administrator.

Leave a Comment

Exit mobile version