Skip to main content

1E 8.1 (on-premises)

DirectoryChange

Trigger

DirectoryChange

Action

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

Parameters

DirectoryPath (string): The path of the directory to monitor for changes. Must be an absolute (non-network) path - e.g. "C:\Some Folder\My folder". Wildcards are not supported; the trigger supports monitoring a single directory only. However, the subdirectories will also be monitored.

Example

<TriggerTemplate Name="DirectoryChange" Category="Event" Description="When a directory changes (Windows only)" Type="DirectoryChange" ReadablePayload="On change of directory "%directoryPath%"">
  <AgentParameters>
    <Parameter Name="DirectoryPath" Value="%directoryPath%" />
  </AgentParameters>
  <UserParameterJson><![CDATA[[{"Name":"DirectoryPath","Pattern":"%directoryPath%","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

Warning

Avoid monitoring one level down (eg c:\temp) as the trigger will also set up a monitor on the parent directory (in this case, c:\), as well, so that changes to the specified directory can be spotted, like it being created. Monitoring c:\ will be very intensive on the machine as every file operation the operating system does will trigger it.