Last active
January 2, 2016 14:58
-
-
Save mintsoft/8319901 to your computer and use it in GitHub Desktop.
Recurse 1 deep in a directory and delete directories older than X
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
| gci *\* | where {$_.PSIsContainer -and $_.CreationTime -lt '2013-01-01T00:00:00'} | %{ write-host $_.FullName; remove-item -recurse $_;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment