Skip to content

Instantly share code, notes, and snippets.

@nikanos
Created March 7, 2023 09:47
Show Gist options
  • Save nikanos/889455d014c6db98ffff6593d73ea33a to your computer and use it in GitHub Desktop.
Save nikanos/889455d014c6db98ffff6593d73ea33a to your computer and use it in GitHub Desktop.
Powershell script to remove empty folders under the current directory
Get-ChildItem -Recurse .|where {$_.PSISContainer -and @($_ | Get-ChildItem).Count -eq 0 }|Remove-Item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment