I need a script to delete files older than 7 days
As per title really, i need a script that i can setup to run daily on a task schedule which will delete files from a set folder that are older than 7 days, does anyone have anything like that to hand?
Seems while similar threads didn't pop up with anything and search didn't display it, google on the otherhand pointed me to another edugeek thread lol
using this is working a treat:
FORFILES /P "E:\SQL Backups\Sims Backups" /S /M *.* /D -8 /C "CMD /C del /Q @file"
FORFILES /P "E:\SQL Backups\FMS Backups" /S /M *.* /D -8 /C "CMD /C del /Q @file"
EDIT2: sorry whoever fil is, not meant to be a mention, but "@ file" apparently points to you lol