mrbios Posted November 17, 2011 Posted November 17, 2011 (edited) 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? EDIT: Nevermind! 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 Edited November 17, 2011 by mrbios
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now