The System.File.Delete activity allows you to automate the deletion of files. It is primarily designed to allow the management of the dated config files, although it can be run against any folder.
The activity does not run against your physical network devices. Instead, from the specified folder and optionally sub folders, it:
- Deletes all files except a specified number of device specific files.
- Deletes files older than a certain number of days.
- Combination of the above two options.
Setting up the activity for System.File.Delete
For information on setting up activities, see Add / Edit scheduled activity details.
Configure the options specific to this activity in the Options tab.
The folder containing the file you want to run the activity against.
|Include sub folders||Select this if you want the activity to run against all sub folders of the selected folder.|
|Number of device specific dated files to retain||
This option allows you to cleanup outdated configs, but also ensure that you always keep a specified number of dated configuration files. Enter the number of files of each device specific type you want to keep.
This works by using the CatTools device filename, for devices specified in the devices tab above, and comparing this to the file names in the folder to identify files that relate to the same device. It then keeps the specified number of files for each device type.
See Troubleshooting if your System.File.Delete activity is not retaining an
|Delete files older than how many days||Delete files older than the specified number of days. This option is of lower precedence than the above option. If both are specified, you still keep