Delete Files Older than 30 days

Discuss and share scripts and script files...
Post Reply
timhatz
Posts: 41
Joined: 12 Dec 2008 06:21

Delete Files Older than 30 days

Post by timhatz »

How would I do a script, that I can hardcode 6 paths, and have all the files in those paths, be deleted if older than 30 days?

Thanks, Tim

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Delete Files Older than 30 days

Post by TheQwerty »

What I would do is...

1) Create a Find Template, that searches those locations for items older than 30 days.

2) Use LoadSearch and Delete in a script to automate the task. Such as:

Code: Select all

"Delete TooOld"
  LoadSearch("TooOld", "rel");
  Focus("List");
  Sel("a");
  Delete(1,1,":list");

Post Reply