User Defined Groups (UDG) can be defined by the user and added to the list of standard groups. They consist of several fields containing data which alltogether describe the requirements a file should meet in order to fit in this group. Kleandisk comes with several pre-defined groups: Core Files, Backup Files, Temporary Files, etc.
Groups can be created in two ways: by right clicking on an item in the UDG tree and via the File menu. After clicking "New UDG" the UDG editor will pop up. This editor contains the fields which will define the new group. See below for a description of these fields.
Right click on the group you wish to delete. A pop up window will appear. Select "Delete" to remove the corresponding group from the list. Note that the files in the group will not be deleted when a group is removed.
Description. The description field can be used for a description of the group.
File Pattern. The files in the group match the regular expression(s) filled in this field. Wildcards are allowed here. E.g. * means any file and *.jpg means all files ending in .jpg.
Folder. This defines in which folder the files must reside. This should not necessarily be a complete path (with a leading /). When you fill in, for example, "/tmp" kleandisk will only add files to this group when they reside in "/tmp" (or any subfolder). When you fill out "tmp", thus without a leading slash, kleandisk will add files to this group when they are contained in any folder named "tmp" or any subfolder of "tmp".
Permanent Files. The files in this list will stay permanent in the list. This can be useful in several cases: log files, mail folders, etc.
Safety Level.This defines how many days ago a file must have been read for the last time to be safe to be deleted. A safety level of 0 means all files in this group are safe to be removed, without regard for the date the file has been read for the last time. Files, according to this number, which are safe to be deleted will appear in the file list view with a green square in front of them.
Maximum Archives/Backups. This defines the maximum number of archives/backups which should be created. When the maximum number is reached the next archive/backup will replace the oldest archive/backup. This feature is especially useful in case of scheduling backup or archives. A value of zero indicates that no backup or archive will ever be automatically removed.
Command. After Kleandisk has finished a scheduled action it's possible to execute a command. Leave this empty if you don't want to execute a command. This field is especially useful in case of rotation of log files. See the "Messages log file" group for an example.
Actions such as deleting or archiving files from an UDG can be scheduled. The "Schedule" settings can be changed via the "Schedule" tab from the UDG editor. You have to check the "Enable Scheduling" field to enable scheduling for the corresponding UDG. It is possible to schedule 3 actions: 'Delete and Backup', 'Delete', 'Archive'. These actions will only deal with the 'green' files of a group. When a group is empty or only contains red files no action will take place. After creating a schedule a clock will appear in the UDG list view. The color of the clock represents the following:
A broken clock means that Kleandisk did not execute the last scheduled action (probably because Kleandisk was not running at that moment).
The time on which actions are scheduled are defined in 3 lists. A day (between 1 and 31), hour (between 0 and 23) and minute (between 0 and 59) list. To add a day to the list first select the radio button in front of the day list. Then choose a day from the spinbox and push the 'add/delete' button. The number of the day will appear in the day list. To remove the last list entry push the 'add/delete' button again. The 'add/delete' button will add or delete a day depending on the number in the corresponding spinbox list. In case of the number in the spinbox being contained in the list, the 'add/delete' button willl delete the corresponding entry from the list. Otherwise the number is added.
To add a cycle to the list check the 'every' box. You can, for example, add a 2-day cycle (day 2, day 4, day 6, ) to the list by setting the spinbox to 2 and check the 'every' box. Note that only one cycle can be added to a list. To remove the cycle add a different cycle or click 'add/delete' again. Note that after setting a cycle it isn't useful to add certain new days. In case of a 5-day cycle you can't add for example 25 to the list because it is contained in the cycle. In case of a 1-day cycle no more days can be added. In the same way hours and minutes can be added and deleted to their corresponding lists.
When you want to schedule an action on every day (day 1, day 2, day 3, etc.) at 12:00 and 20:00 you have to make the follwing lists: Days: every 1 Hours: 12, 20 Minutes: 0
If Kleandisk is started for the first time you will notice that all UDG's are empty. To fill these groups you have to scan the hard disk for files. This can be done by selecting "Update UDG's" from the File-menu. The result of the update will be saved between different sessions of Kleandisk. (Note that this may change in the future.)
Click on a UDG to see the contents in a list view. The files can be selected seperately by clicking on the squares. Pushing the "Select all" button will select all green squares. Pushing "Deselect all" will deselect all files.