File Watcher Utility

The Control-D/Agent File Watcher utility actively monitors designated directories to identify newly arrived files, such as reports, in the local file system. You can use a mask to search for files that arrive in the system and transfer them to the Control-D Delivery Server or Control D. The File Watcher utility then invokes the File Transfer Client utility to transfer the matching files. The File Watcher also enables you to save or delete the files after the file transfer process.

Running the File Watcher Utility

This procedure describes how to run the Control-D File Watcher utility, which detects the arrival of new files in the local file system or repository and runs from the command line to detect a single file or multiple files.

Begin

  1. Log in to a host where Control-D Delivery Server is installed.

  2. Do one of the following:

    • UNIX

      1. Set the environment variable display to 0.0 by running the following command:

        setenv DISPLAY <working station IP address>:0.0

      2. Start the file watcher utility by running the following command:

        start_filewatcher

      3. From the bin folder, start the file watcher application window by typing the following command:

        bmc-ctd-filewatcher-gui

    • Windows

      1. From the Services window, right-click BMC Control-D/Agent file watcher and select Start.

      2. Click Configure File Watcher

  3. For each field, define the required parameters, as described in Control-D File Watcher Configuration Parameters.

  4. Continue with the on-screen instructions until the installation is complete.

Control-D File Watcher Directory Parameters

The following table describes the Control-D File Watcher directory definition parameters.

Parameter

Description

Action

Defines one of the following actions to run the File Watcher utility:

  • Command line: Defines the command to process a matched file.

    ProcessAndSend.sh %%FILE_PATH

    • %%FILE substitutes the watched filename to the variable in the command.

    • %%FILE_PATH substitutes the watched file path and the watched filename to the variable in the command.

    • %%INSTALLATION_PATH substitutes the installation path to the variable.

  • Destination (Recommended): Defines the selected parameters to locate a file.

    • Host: Determines which host receives the file transfer request.

    • Port: Determines the port number of the receiving host server.

    • SSL: Enables you to use SSL encryption.

    • Target path: (Optional) Determines the absolute destination path.

Delete after execution

Enables you to delete processed files.

Valid values:

  • Yes: Deletes processed files.

  • No: Automatically store removed files in the sub-directory.

Default: No

Directory path

Defines the full directory path to poll new files.

Mask

Defines the prerequisite specification for file search.

The name can include the wildcard character * to represent any number of characters.

Default: *

The utility identifies files, that begin with Branch_20 and ends with .av when you define Branch_20*.*av. The File Watcher utility searches for files, which match the criteria and invokes the File Transfer Utility to send the files to a designated destination.

Name

Defines the logical name of the watched directory.

Overwrite when done

Enables you to overwrite processed files.

Valid values:

  • Yes: Overwrites existing files with identical names.

  • No: Adds a suffix to files with identical names to create a unique filename.

Default: No

Control-D File Watcher Configuration Parameters

The following table describes the Control-D File Watcher configuration parameters.

Parameter

Description

Max parallel executions

Determines the maximum number of destinations or command line parallel executions.

Valid values: 1−2000

Default: 10

Polling interval

Determines the number of seconds to wait before checking the status of the job.

Valid values: 1−600

Default: 30

Verification ready count

Determines the maximum number of times to verify that a matched file is correct.

Valid values: 1−100

Default: 3

Refresh configuration interval

Determines the number of seconds to wait before refresh the configuration parameters.

Default: 30