Posts by Jucimário Santana • 21 points
2 posts
-
1
votes1
answer1438
viewsA: Removing files for period of time
I was able to solve, a parameter was missing: Solution replacing the Where by the script below: Where-Object {!$_.PSIsContainer -and $_.LastWriteTime -le $Date}…
powershellanswered Jucimário Santana 21 -
1
votes1
answer1438
viewsQ: Removing files for period of time
I am with script to remove file leaving only the last ones defined on time Script: $Now = Get-Date $Days = 30 $TargetFolder = "C:\LOG" $Extension = "*.*" $LastWrite = $Now.AddDays(-$Days) $Files =…
powershellasked Jucimário Santana 21