ctmfw parameters

The following table lists the ctmfw utility rules file parameters:

Parameter

Description

FILE

Path of the file to be detected. The file name can include wildcard character * to represent any number of characters (including no characters) or ? to represent any one character.

NOTE: The path and file name must not exceed 214 characters.

mode

CREATE

Detects creation of a file. Default. File size is ignored if the filename parameter contains wildcards (unless the monitor file size when wildcard is used parameter is set to Y).

NOTE: If a mask is specified for the filename, and the monitor file size when wildcard is used parameter is set to:

  • N, the ctmfw utility will end OK after detection of the first file that matches the specified mask.
  • Y, the ctmfw utility will end OK after detection of the first file that matches the filename and file size.

For more information about monitor file size when wildcard is used, see below.

DELETE

Detects deletion of a file. When the ctmfw utility is run in this mode, it first checks for files that match the specified name. After a specified file is detected, the ctmfw utility checks at the specified interval for deletion of that file.

NOTE: If a mask is specified as the filename, the ctmfw utility will end successfully only after all detected files that match the specified mask have been deleted.

minimum detected size

Minimum file size in bytes. This parameter is ignored if the FILE parameter contains wildcards (unless the monitor file size when wildcard is used parameter is set to Y) or if the mode parameter is set to DELETE. Default: 0 (any size detected).

interval between file searches

Interval between successive attempts to detect the existence/deletion of a file (in seconds). Default: 60

interval between filesize comparison iterations

Interval between attempts to monitor the size of a file after it is detected (in seconds). This parameter is ignored when using wildcards in FILE or when using DELETE mode. Default: 10

number of iterations while size is static

Number of attempts to monitor file size where the size remains static and greater than or equal to minimum detected size (indicating successful creation of the file). This parameter is ignored when using wildcards in FILE or when using DELETE mode. Default: 3

time limit for the process

Maximum time (in minutes) to run the process without detecting the file at its minimum size (CREATE) or detecting its deletion (DELETE). If the file is not detected/deleted in this specified time frame, the process terminates with an error return code, as described in Return codes. Default: 0 (no time limit).

monitor file size when wildcard is used

Indicates whether file size should be monitored if the filename contains wildcards. This parameter is ignored if the filename does not contain a wildcard. Valid values:

  • N – do not monitor file size (Default)
  • Y – monitor the file size

If this parameter is set to Y and more than one file matches the specified mask, the ctmfw utility selects the first file that is detected, monitors its file size, and ignores all other matching files.

starting time for detecting files

Indicates an absolute time at which the utility starts monitoring the file. For example, 200712061400, means that at 2 PM on December 6th, 2007 the FileWatcher utility will start watching the file.

Alternatively, you can use the HHMM format, in which case the current date is used.

absolute stop time

Indicates an absolute time at which the file is no longer watched. For example, 200702061400, would mean that at 2 PM on February 6th, 2007 the FileWatcher utility will stop watching the file.

Alternatively, you can use the HHMM format, in which case the current date is used.

maximal age of file

Indicates the maximum amount of time that can pass since the file you want to watch was last modified. For example, 2y3d5h means that after 2years, 3 days, and 5 hours has passed, the file will no longer be watched. Entering a value of 2H10Min, means that after 2 hours and 10 minutes has passed, the file will no longer be detected.
This parameter is ignored if the mode parameter is set to DELETE. Default: 0

NOTE: If using the default value, files older than 10 years cannot be detected by the utility. If you want to detect files older than 10 years, you must define the number of years, such as 11y.

minimal age of file

Indicates the minimum amount of time that must have passed since the file you want to watch was last modified. For example, 2y3d5h means that 2years, 3 days, and 5 hours must pass before the file will be watched. Entering a value of 2H10Min, means that 2 hours and 10 minutes must pass before the file will be detected.
This parameter is ignored if the mode parameter is set to DELETE. Default: 0

Parent Topic

ctmfw File Watcher utility