(Available in EFT Enterprise) When you create your first Site, a Timer Rule is created that runs the Backup Server Configuration Action once each day at midnight, using all defaults for naming and backup location (\backup\Server Configuration Backup [Month] [Day] [Year].bak). The Rule includes a Cleanup in folder Action to delete backup files (*.bak) older than 30 days in that same folder and another Cleanup in folder Action to remove old log files. This Backup and Cleanup Rule is enabled by default, but you can disable it and edit it as necessary.
The Cleanup in Folder Action is available only with the On Timer Server Event. At the interval that you specify, EFT compares the filter parameters of the Cleanup in folder Action to the files in the designated folder, then determines the creation or modification time of the file and deletes ("cleans up") files that match the cleanup parameters. For example, if you specify to cleanup files that are older than 7 days named dailyreport*.doc in the folder D:\WorkFolder\Sales\Daily Reports, any Microsoft Word files in that folder with dailyreport in the file name are deleted after 7 days. However, if you create a Cleanup in folder Action and set a file to be cleaned after 7 days, but then modify the file on the 6th day, the file will not be deleted until 7 days after the modification date.
To configure EFT to cleanup files automatically
Follow the procedure in Creating Event Rules to create a Scheduler (Timer) Event. The Event Rule appears in the Rule Builder.
In the Actions list, double-click Cleanup in folder. The Action is added to the Rule in the Rule Builder.
In the Rule Builder, click the '[select]' link. The File Cleanup Action Parameters dialog box appears.
Specify which type of file timestamps you want to delete: Created time, Modified time, or Both created and modified times.
In the Delete file(s) older than <n> box, specify the minimum age of a file to delete from the folder. The default is 7 days.
In the Folder box, click the folder icon to specify the folder that you want to clean up.
To clean up subfolders in the specified folder, select the Include sub-folders check box.
If you don't want to delete all of the files older than a certain age, create a File delete filter mask. In the Filenames box, an asterisk appears by default, which means delete all files. You can Include or Exclude specific files from the Cleanup in folder Action, and/or use wildcards for file types, partial names, and so on.
For example, the Backup and Cleanup Event Rule that is defined automatically in EFT Enterprise is configured to delete all *.bak files in C:\ProgramData\Globalscape\EFT Server Enterprise\Backup that are older than 30 days.
Or, maybe you want delete everything in the folder except for the files with "new" in the file name. To do that, you would click Exclude and then in the Filenames box, type *new*.
Click OK to close the dialog box.
Click Apply to save the changes on EFT.