Created
April 29, 2020 00:48
-
-
Save jfrantz1-r7/17dc2009a5f6f66e1b34b6d54155a460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem $directory -Directory -Recurse -Force | | |
Sort-Object -Property FullName -Descending | | |
Where-Object { $($_ | Get-ChildItem -Force | Select-Object -First 1).Count -eq 0 } | | |
Remove-Item |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment