Skip to main content

1E 8.1 (on-premises)

FileChange

Trigger

FileChange

Action

Triggers when a nominated file is modified (including created or deleted). If the corresponding file does not exist at the point that the trigger is initialized, the trigger will poll periodically (approx. every minute) for this file to be created.

Parameters

FilePath (string): The path and name of the file to monitor for changes.

Example

<?xml version="1.0" encoding="UTF-8"?>
<TriggerTemplate Name="FileChange" Category="Event" Description="When a file changes (Windows only)" Type="FileChange" ReadablePayload="On change of file "%fileName%"">
  <AgentParameters>
    <Parameter Name="FilePath" Value="%fileName%" />
  </AgentParameters>
  <UserParameterJson><![CDATA[[{"Name":"FileName","Pattern":"%fileName%","DataType":"string","ControlType":"freeText","ControlMetadata":null,"Placeholder":"filename","DefaultValue":null,
  "Validation":{"Regex":null,"MaxLength":"1024","AllowedValues":null,"NumValueRestrictions":null},"Value":null,"HintText":null,"Source":null}]]]>
  </UserParameterJson>
</TriggerTemplate>

Platforms

  • Windows

Notes

The filepath must an absolute (non-network) path - e.g. "C:\My Folder\MyFile.txt", not "MyFile.txt" or "\My Folder\MyFile.txt".

Wildcards are not supported; the trigger supports monitoring a single file only. To monitor multiple files for a rule, attach multiple FileChange triggers.