I have several files named like yyyymmdd-hhmiss.JobActivity2Reportyyyymmdd.csv.
I need a Windows command (a single command preferably, not a CMD file) that deletes files with this naming format that are older than 14 days. I would put this command into a Tidal(Scheduler) job to keep the Archive directory cleaned up. Also, I want to use the timestamps on the file (and not the timestamps encoded into the file name) to decide what to delete – it’s possible multiple files could come in on the same day for different days – for example, we may get Saturday, Sunday, and Monday files on Monday.
Any help will be appreciated.
Thanks a lot.