File Event Listener

The goal of the File Event Listener is to monitor changes to files residing in a folder accessible from Data Mover Smart.

The File Event Listener detects all changes in the monitored folders, i.e., new files appearing in those directories as well as existing files being updated.

Processed files can remain in their original location and will never be processed again since the File Event Listener keeps track of the status of the monitored location.

To create a File Event Listener, click the New button on the upper left corner and fill in these fields:

  • General Information: assign a name to the File Event Listener you are creating and optionally enter a description.

  • Listening folder (local or remote):

    • Local | Remote: select the location type for your File Event Listener. You can either enter the file system folder (use this format: /home/dms/tmp) or a remote location. Remote locations are the Links configured in the Links section. Select the Link and fill in the Credential and remote path (if applicable).

    • Polling: this setting determines the interval, in seconds, at which the system will monitor the folder for changes.

    • Icon: assign an icon to the File Event Listener you are creating.

  • Trigger:

    • New file: in the Choose a period section, you can optionally specify a time window during which the system should search for files. If no period is selected, files will be searched at any time.

      • From / To: select a start and end time using the clock icons.

    • Timed (default): the system repeatedly checks the file to ensure it is stable (i.e., no longer changing) before proceeding. These two settings work together to ensure that files are stable and fully written before the system processes them.

      • Check File: this option appears only when the listening folder is Local and sets how many times the system should verify that a file remains unchanged before proceeding.

      • Check Every (seconds): define the interval, in seconds, between each stability check.

    • Flag file: define the prefix or suffix of the flag file that must appear in the file system to indicate that a corresponding file is ready to be processed. Both the prefix and suffix must include the dot. You must enter either the prefix or the suffix in this field. The system will use it to detect the presence of the flag file and determine when processing can safely begin.

  • πŸš€ Condition branch: define multiple branches that determine different actions to be executed according to the condition attributes, actions and mode selected in the following sections. Additional conditions can be created using the + button on the right. Conditional branches allow you to define rules that determine which actions to execute when specific conditions occur. For example, you may want to rename or zip a file depending on its name. If multiple conditions are met, only the first will be executed, and the rest will be ignored.

  • Condition attributes: click the + button and select or create an Attribute. πŸš€ RegEx and wildcards are supported in the Value field. Ensure you are in the correct branch if you have created multiple condition branches. For example, you may need the system to perform a specific action if the file arrives from a specific sender or has a specific filename or a specific file size.

circle-info

These attributes are configured in Settings β†’ Metadata and belong to the Fel_condition category.

  • Actions: select the action to be executed when the condition attribute is set. Ensure you are in the correct branch if you have created multiple condition branches. You can run a script, decrypt and encrypt files using PGP, rename, zip files. For a description of these options, go to the Actions page.

  • Mode: select either Copy or Move to copy or move the file and set a destination folder where the action will be executed. Ensure you are in the correct branch if you have created multiple condition branches.

  • Destination folder (VFS): set a destination folder for the files involved in the action configured in the File Event Listener.

  • πŸš€ Attributes: assign attributes to the File Event Listener. When you click the + button, the Attribute pane opens. Selecting the Dictionary icon displays a tooltip with available macros, which can be used in the Value field. You can either enter a specific value or type ${ to insert the macro. To create a new attribute, click New; the New Metadata window appears with the Fel_attribute category already set.

When done, click the Save button. The File Event Listener will be added to the list of options, in status "running" - if created correctly.

Click the 3-dot icon to access these options:

  • Edit: change any options set in the File Event Listener.

  • Clone: clone the File Event Listener.

  • Enable/Disable: enable/disable the File Event Listener. When disabled, it remains configured but not operative.

  • Stop: this option appears when a File Event Listener is running and allows you to stop it.

  • Start: this option appears when a File Event Listener is not running and enabled. It allows you to scan folders. Files already present in the folder can be included or not in the scan. Clicking Yes, they will be scanned, clicking No, they will be ignored.

  • Restart: this option appears when a File Event Listener is running and allows you to restart it. Files already present in the folder can be included or not in the scan. Clicking Yes, they will be scanned, clicking No, they will be ignored.

  • Delete: delete the File Event Listener.

  • πŸš€ Add to template (optional, requires permission): include the selected File Event Listener in a predefined group of Data Mover Smart entities for export. This option is useful for performing selective backup or migration operations. When you select Add to template, you will be able to add the File Event Listener to a template that specifies which entities will be exported. All dependent entities managed by the File Event Listener will also be included. For example, if a File Event Listener references a VFS path, credential, or link that is not included in the template, the generation procedure will automatically add them. Templates are created and managed in ​ Settings β†’ Import & Export β†’ DMS β†’ Template.

When configuring the File Event Listener, a panel on the left of the screen allows you to:

  • Enable or disable the File Event Listener.

  • Enable or disable the Pull On Init option. By default, this setting is turned off.

  • View and, if necessary, override the system’s default time zone.

  • Add tags to the File Event Listener.

  • Clone the File Event Listener.

  • Delete the File Event Listener.

Last updated