Where they at though?

Sure you can browse your file structure to find empty directories, but there’s nothing better than doing it with a script.

This will check the target directory for empty folders and delete them for you. Remove “-WhatIf” when you’re ready for production mode.

# folder to check for empty directories
$path = "c:\temp"

# find those empty hooyas
$empty = Get-ChildItem $path -Directory -Recurse | Where-Object {($_.GetFiles().Count -eq 0) -and $_.GetDirectories().Count -eq 0}

# delete empty directories
$empty.FullName | Remove-Item -Force -WhatIf