You can define directories in which older files are deleted automatically.

  1. Open PCU configuration settings » General » RemoveOldFiles.
  2. Add a new element for each directory from which files are to be deleted.
  3. Click the new element and configure the following parameters.
    1. Enter the Path of the directory to be checked.
      From the perspective of the real-time system, set the path as the absolute path in Unix syntax . For example, enter /home/patools/sav0. After validation, this path is used as an entry for the node in the tree structure.
    2. Enter the MaxAge of the files in days.
      The maximum age of the files must be greater than 0. Files older than the configured number of days are deleted. The time of the last modification is used as the age of the file.
    3. For Recursive, select whether all subdirectories are deleted.
      • Enabled: all subdirectories are deleted.
      • Disabled: subdirectories are not deleted.
    4. For CheckDate, specify when a check is performed to determine whether old files must be deleted.
      The following value ranges are allowed for each entry.
      Table 6. Allowed Value Ranges
      Input Field Value Range
      Minute 0 to 59
      Hour 0 to 23
      Day 1 to 31
      Month 1 to 12
      DayofWeek 0 to 6, where 0 is Sunday.

      All entries are mandatory. The following inputs are allowed:

      Table 7. Allowed Inputs
      Input Frequency Examples
      * Always If you enter * for Day, the check is performed every day.
      Integer Single value If you enter 1 for Month, the check is performed the first month of the year.
      Start–end Value range If you enter 1-4 for Hour, the check is performed every hour from 0000 to 0400.
      <Value 1>,<Value 2>...<Value N> List of values If you enter 0,20,40 for Minute, the check is performed every 20 minutes.
    5. Optional: Configure the Includes list.
      Specify the patterns for the file names for which the check is to be performed. If you specify one or more pattern, only files that meet the naming rules are deleted. If you do not specify a pattern, all files that meet the maximum age specification are deleted.
      The following placeholders are allowed.
      Table 8. Allowed Placeholders
      Character Placeholder for Example Pattern
      * Any number of characters .e*
      ? Exactly one character .e?0

      If the placeholder contains folder names, the folders are deleted if the folders are empty. Folders that contain subfolders or subfiles are retained.

    6. Optional: Configure the Excludes list.
      Specify the patterns for the file names that are never deleted, even if the files exceed the maximum age allowed. The Excludes list is evaluated after the Includes list. If a name pattern matches both lists, it is excluded from deletion.

      The same placeholders are allowed as for the Includes list.

    7. Optional: Validate the log of all checks made in the following file: /home/patools/log/autom.log.
      The maximum log file size is 2 MB. If the file size exceeds 2 MB, older logs are overwritten.