Personal computing discussed

Moderators: renee, SecretSquirrel, just brew it!

 
puppetworx
Gerbil Elite
Topic Author
Posts: 710
Joined: Tue Dec 02, 2008 5:16 am

Script to delete all files more then a week old

Mon Dec 20, 2010 3:51 pm

Total code newb here (apart from HTML/CSS but that hardly counts).

I need a script to delete all files older then a week from a certain directory and all it's subdirs, but not the folders themselves. I want it to work on XP and 7, since it needs to recognise the date that files were created I believe this means I'm looking at a VBScript.

Thought I'd post here and ask if anyone has such a script? Seems like a fairly common, simple task. If not I'll attempt to hack one together myself from what Google turns up and post what I come up with. Might be of use to some others.
 
puppetworx
Gerbil Elite
Topic Author
Posts: 710
Joined: Tue Dec 02, 2008 5:16 am

Re: Script to delete all files more then a week old

Mon Dec 20, 2010 4:43 pm

Working for me too, beautiful!

Was just starting to learn the basics when I saw you'd posted this. One of these days I will actually have to learn how this stuff works though. One of these days.

Sure more people will dig this too, thanks man!

Who is online

Users browsing this forum: No registered users and 6 guests
GZIP: On