Last active
October 23, 2019 13:06
-
-
Save Clickbaitcake/908ba372d4f68d3ec59efed0f9ce6c6b to your computer and use it in GitHub Desktop.
Removes data in folder that was created more than 60 days ago.
This file contains 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
CD "C:\PATHHERE" | |
Get-ChildItem | Where-Object {($_.CreationTime -lt (Get-Date).AddDays(-60))} | Remove-Item -Force -Recurse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment