Skip to content

Instantly share code, notes, and snippets.

@jwieder
Created February 20, 2016 18:23
Show Gist options
  • Save jwieder/98029786d45cb6dcb9a1 to your computer and use it in GitHub Desktop.
Save jwieder/98029786d45cb6dcb9a1 to your computer and use it in GitHub Desktop.
Powershell script to identify all empty folders in C partition. Replace C:\ with the path of your choice
$a = Get-ChildItem C:\ -recurse | Where-Object {$_.PSIsContainer -eq $True}
$a | Where-Object {$_.GetFiles().Count -eq 0} | Select-Object FullName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment