Skip to content

Instantly share code, notes, and snippets.

@kokeiro001
Last active September 12, 2016 15:59
Show Gist options
  • Save kokeiro001/d8fe7e33c40f59900644bfc0266f0d50 to your computer and use it in GitHub Desktop.
Save kokeiro001/d8fe7e33c40f59900644bfc0266f0d50 to your computer and use it in GitHub Desktop.
空のディレクトリを再帰的に見つけて削除
Dir -Recurse | ? { $_.PSIsContainer -And !$_.GetFiles().Count -And !$_.GetDirectories().Count} | %{ $_.FullName } | Remove-Item -Recurse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment