This commit is contained in:
Markus Fleschutz
2020-12-25 10:30:43 +00:00
parent 4cb019eee0
commit 94106839fd
51 changed files with 164 additions and 174 deletions

View File

@ -8,13 +8,12 @@
param([string]$DirTree)
write-host "Listing empty subfolders in $DirTree ..."
try {
write-progress "Listing empty subfolders in $DirTree ..."
(Get-ChildItem $DirTree -recurse | ? {$_.PSIsContainer -eq $True}) | ?{$_.GetFileSystemInfos().Count -eq 0} | select FullName
echo "Done."
exit 0
} catch {
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}