Created
April 4, 2017 21:09
-
-
Save TheRealNoob/3fdc7f27c9db6cee629dd5f2c2effb96 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
| $backuppath = 'C:\Fraps' | |
| $date = Get-Date | |
| Foreach ($month in 1..12) { | |
| $monthslist = Get-ChildItem $backuppath | where ($_.LastWriteTime.Month -eq $month) | sort #latest file date | |
| #delete all but latest file | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment