Last active 1725105003

Revision 997805bfb621c17120409baf50f237ffac34de5a

deleteEmpty.ps1 Raw
1$LogPath = Read-Host 'Path to delete empty folders'
2Get-ChildItem -LiteralPath $LogPath -Force -Recurse | Where-Object {
3 $_.PSIsContainer -and `
4 @(Get-ChildItem -LiteralPath $_.Fullname -Force -Recurse | Where { -not $_.PSIsContainer }).Count -eq 0 } |
5 Remove-Item -Recurse