If you work with the computer for a long time, you certainly know the problem. You create many folders around e.g. B. to store and sort your data. However, some folders may remain empty. Even if you uninstall some programs, empty folders may be left behind. With a small code or software, you can find and delete empty folders.
Find and delete empty folders
When you create a new folder, Windows labels it New Folder. To find the empty folder, do the following:
Start PowerShell ( instructions here )
Enter the following code:
$SomePath="C:\Users\windowspowerde\Desktop"
Get-ChildItem -Path $SomePath -Recurse -Directory | ForEach-Object -Process {
if ($false -eq $_.GetFileSystemInfos())
{
$_.FullName
}
}
Please adjust the following line: $SomePath="C:\Users\windowspowerde\Desktop"

After that, all empty folders will appear .
Find empty folders with software
if you want it easier, you can also use special software that detects and deletes empty directories with just 1-click. One of them is Remove Empty Directories.
Remove Empty Directories deletes all empty folders found with very little.
Once you have downloaded the program, click on Scan folders.

All folders that are empty and found are marked in red. With a click on Delete folders, they will all be deleted.