delete_files_older_than

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
delete_files_older_than [2023/02/20 01:38] osodelete_files_older_than [2024/10/17 21:42] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 <code powershell> <code powershell>
-Get-ChildItem -Path C:\inetpub\mailroot\Badmail.old -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt (Get-Date).AddDays(-90) } | Remove-Item -Force -Verbose+Get-ChildItem -Path C:\inetpub\mailroot\Badmail -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt (Get-Date).AddDays(-30) } | Remove-Item -Force -Verbose
 </code> </code>
delete_files_older_than.1676857123.txt.gz · Last modified: 2024/10/17 21:42 (external edit)