PowerShell can help you easily find empty folders in Windows 10. It only takes a few command lines.
If you like tidy spaces, frequently delete all junk and hate empty junk folders, then you can use the built-in Windows 10, auxiliary PowerShell program to find empty folders very easily. And from then on it's up to you if you will delete these blank folders or not.
You can run a simple command in PowerShell and it will list all the empty folders it will find in specific locations that you have specified. In this command you can set the search to a whole unit disk or in a specific folder. Let's see how.
Step 1: Open PowerShell and run the following command.
$ SomePath = "C: \ Configuration \ dimitris"
Step 2: Then run the following command
Get-ChildItem -Path $ SomePath -Recurse -Directory | ForEach-Object -Process {if ($ false -eq $ _. GetFileSystemInfos ()) {$ _. FullName}}
You are most likely to have zero results because you simply need to first edit the first command of step 1, the above instructions, to suit your needs. Just replace the path that is within the quotes with the path of the folder you want to scan. It may be the entire C disk, so the command will be:
$ SomePath = "C: \"
or if you want to scan a user's folder, the command will be:
$ SomePath = "C: \ Users \ UserName"
The command will return a list of all empty folders to the specified location. The list will include the full 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 it through PowerShell, but it's easier to delete them from File Explorer.
If you run this command on a whole drive, you may need more time to complete and see the results, especially if you run it on the Windows drive, however, it still scans quickly and is much better than using a classic or even a well-constructed corresponding tool.
It's worth noting that you do not need administrator privileges to run this command, however, if you run it on the Windows drive, you have to run it with administrator rights, otherwise you will not be able to scan certain folders that are protected by the system.
It is possible that even with administrator privileges, the command may not be able to scan specific Windows folders. In this case, it is better to leave these folders in place and do not disturb them. They may be empty, but the operating system created them and may need to use them for something. If you delete the folders and later forget you did it, you might end up with problems and not understand what's going on.