How can i have a list of folders in file manager identify how many items are in each folder or at least show which folders are empty without having to look at each folder?
1 Answer
Not possible in Explorer. To get a list of empty folders in PowerShell, you can use:
gci -dir -recurse | ? { !(gci -LiteralPath $_.FullName -force) } | select FullName
If you want to delete empty folders:
gci -dir -recurse | ? { !(gci -LiteralPath $_.FullName -force) } | Remove-Item -force