December 19, 2006 at 11:18 am
Tasks:
Archive Structure:
Problem:
I have set up a for each loop for each archived folder to loop though and count the number of files saved. If there are more than 3 files I want to delete the oldest file. It is very possible there could be multiple files during a given day. Is there any way to compare the date on the file (not in the filename) to find out which one is the oldest?
One thing I've considered but feel is cludgy is using the rename funciton of the File System task. IE if there are more than 3 files, then loop through and change any .zip2 to .zipdel and any .zip1 to .zip2 and .zip to .zip1 then deleting the .zipdel. I'd like a cleaner way to accomplish.
If anyone has done something similiar, I'd appreciate the feedback.
December 20, 2006 at 2:47 am
Hi,
You could achieve this through a simple script task.
Regards
Daniel
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply