SureSync can be used to purge old files out of a directory based on modified dates. This is useful to clean out directories which store things such as temporary work files which are processed and then are no longer needed. To configure SureSync to purge old files from a directory do the following:
- Create a new Job.
- Add the one path to the remote machine. If it is an agent machine, don’t forget to select the agent.
- Click <Next> which will take you to the Rule Wizard, where you only have two selections, Delete and Skip.
- Select Delete, and just click <Next> to all the other panels. The File Mask defaults to ’*.*’ all files.
- After your Delete Job is created, expose the Rule, and go to the Dates tab.
- From the Dates tab, check ’Apply this Rule only when the file modification date is between these ages’. The key word here is ’ages’. You will specify files older than x days.
- In the first ’Days’ field, key in the number of days, after which you want to purge. For example, if you want to keep files up to 150 days, key in 151. Files which are 151 days old or older will be deleted.
- In the second ’Days’ field, key in 9,999. This is just the upper limit.
- Click <Apply>.
- Preview the completed Job first to ensure it is deleting the correct files before actually running the job.
Note: You can also configure SureSync to delete files based off a specific range of dates. For example, all files with modified dates from 1/1/2008 through 1/31/2008. However, this is not as useful in this particular scenario because it would require a Rule change every time you planned to run the purge.