Calculate week of the month a file was last written to PowerShell
Is there any way to calculate in what week a file was last written to?
The situation is as follows: I have a lot of Full SQL backup files (.BAK
files), written only on sundays, but... I only need to keep the files
written to in the 4th(or last) week of the month (not only the current
month, but the month in which the file was last written to).
So the search would be something like; check if files are written to in
the last week of the month and delete everything that is not equal to the
last week of the month.
Is there any way I can do this with PowerShell?
No comments:
Post a Comment