File System Trigger
Description
Triggers task execution when one or more files are added, modified or deleted in the folder specified. Can also trigger execution when a number of files exceed the amount specified, when one file size exceeds the amount specified or when the total size of the monitored folder exceeds the amount specified.
Practical usage
Most frequently used to monitor folders for incoming files. When these files arrive, they can be automatically copied, uploaded, renamed, encrypted, compressed , or a number of other Automate Desktop actions can be used to complete the process.
Parameters
General
Property | Type | Description |
---|---|---|
Folder | Text | The folder that this trigger will monitor. Click the Folder icon to navigate to the folder you wish to monitor or manually enter the full path and folder name in the provided text-box. |
Include subfolders | Yes/No | If selected (default), specifies that subfolders that reside in the target folder (specified in the Folder parameter) will be monitored as well. If disabled, subfolders are ignored. |
Wait for file to be accessible before triggering | Yes/No | If selected, specifies that the trigger will delay task execution until the target files are accessible and no longer in a "locked" state. Non-accessible or locked files are usually being used by a user, application or other system resource. As soon as the file is no longer being used, the trigger will become active. If disabled (default), file accessibility is ignored. |
Prerequisites
Property | Type | Description |
---|---|---|
File added | Yes/No | If selected, this trigger will monitor for the specified files to be added to the target folder and start the task as a result. If disabled, file additions will be ignored. |
File removed | Yes/No | If selected, this trigger will watch for the specified files to be removed from the target folder and start the task as a result. If disabled (default) file removal will be ignored. |
File renamed | Yes/No | If selected, this trigger will watch for the specified files to be renamed and start the task as a result. If disabled (default) file renaming will be ignored. |
File modified | Yes/No | If selected, the trigger will start the task as a result of any modifications made to the specified files. File changes include alteration of contents or modification of attributes. If disabled (default) file modifications will be ignored. |
Folder added | Yes/No | If selected, this trigger will monitor for the specified folders to be added to the target folder and start the task as a result. If disabled (default), folder additions will be ignored. |
Folder removed | Yes/No | If selected, this trigger will watch for the specified folders to be removed from the target folder and start the task as a result. If disabled (default) folder removal will be ignored. |
Folder renamed | Yes/No | If selected, this trigger will watch for the specified folders to be renamed and start the task as a result. If disabled (default) folder renaming will be ignored. |
Folder modified | Yes/No | If selected, the trigger will start the task as a result of any modifications made to the specified folders. Modifications include alteration of contents or modification of attributes. If disabled (default) folder modifications will be ignored. |
Number of files exceed | Number | Task execution starts when the total number of files in the target folder surpasses the value entered. If no value is entered, this parameter is ignored. |
Number of folders exceed | Number | Task execution starts when the total number of folders in the target folder surpasses the value entered. If no value is entered, this parameter is ignored. |
One file size exceeds | Number | Task execution starts when the size of a single file residing in the target folder surpasses the amount entered (in kilobytes). If no value is entered, this parameter is ignored. |
Total file size exceeds | Number | Task execution starts when the total size of the folder being monitored exceeds the amount of kilobytes entered. If no value is entered, this parameter is ignored. |
Filters
Property | Type | Description |
---|---|---|
Include Mask | Text | Specifies
any filters that should be included in the search. This parameter
supports full path and file name entry (for example, c:\temp\filename.txt)
as well as the use of wildcard characters (for example, c:\temp\*.txt).
Additionally, multiple filters can be specified by using a pipe
(|) character to separate each file (for example, c:\temp\*.txt|*.jpg|*.xls).
See File
Masks & Wildcards for more details. NOTE: Files with invalid paths are ignored at runtime. |
Exclude Mask |
Text |
Specifies
the filters to be omitted from the search. This parameter supports
full path and file name entry (for example, c:\temp\filename.txt),
as well as the use of wildcard characters (for example, c:\temp\*.txt).
Additionally, multiple filters can be specified by using a vertical
bar or pipe to separate each filter (for example, c:\temp\*.txt|c:\temp\*.jpg|c:\myFolder\*.xls).
See File
Masks & Wildcards for more details. NOTE: Files with invalid paths are ignored at runtime. |
Users
If this trigger is set to monitor a folder or file location on a network share or drive, or a location with limited or restricted access, a user with proper permissions to that share is required.
Property | Type | Description |
---|---|---|
No user required | Yes/No | If selected (default), no user account is required to access the specified drive or share. If disabled, a valid user is required. |
Use default user account | Yes/No | If selected, the user entered in the Default User properties will be used. Disabled by default. |
Use specified user account | Yes/No | If selected, the user account entered below will be used (disabled by default). This account will always override the Use default user option. Disabled by default. |
Username | Text | The username that this trigger should use to access the folder or file location on a network share or drive, or location with limited or restricted access. |
Password | Text | The password that this trigger should use to access the folder or file location on a network share or drive, or location with limited or restricted access. |
Domain | Text | The domain or computer name of the location being monitored. |
Behavior
Property | Type | Description |
---|---|---|
Enable trigger | Yes/No | If selected (default), specifies that the trigger is enabled. If disabled, the trigger is disabled. |
Trigger on startup if condition is true | Yes/No | If selected, the trigger will act on conditions that already exist upon startup. If disabled (default), existing conditions are ignored. For example, assume the file to monitor already exists in the target folder upon creation or startup of this trigger. Yes, will immediately launch the task, however, NO will not. |
Trigger after the condition has been met 'X times | Yes/No | If selected, specifies how many times the trigger condition must be met before the task is started. |
Additional notes
AMTrigger
When this trigger is activated, it automatically passes the AMTrigger object to the task. AMTrigger is a standard Automate Desktop dataset and can be used much like the datasets created by the Database - SQL query activity and Email action. The fields of AMTrigger can be used within a task to determine specific values, such as whether or not the task was started by a trigger, which trigger started the task, when the trigger was activated and other properties. AMTrigger populates a unique set of field–value pairs for each Automate Desktop trigger. The following table lists the ones specific to this trigger. For more details about a specific AMTrigger field–value pair, click the associated link.
Name | Data Type | Return Value |
---|---|---|
AMTrigger.Action | String | Returns the file/folder related action that took place to cause the task to trigger. |
AMTrigger.Count | Number | If the AMTrigger.Action field returns TOO MANY FOLDERS or TOO MANY FILES, this value is the total number of folders or files that activated the trigger. |
AMTrigger.FileName | String | If the AMTrigger.Action field returns FILE ADDED, FILE MODIFIED or FILE DELETED, returns the path and file name of the file that was either added, modified or deleted (according to the file action that the user initially set for the trigger). |
AMTrigger.FolderName | String | If the AMTrigger.Action field returns FOLDER ADDED, FOLDER MODIFIED or FOLDER DELETED returns the path and name of the folder that was either added, modified or deleted (according to the folder action that the user initially set for the trigger). |
AMTrigger.NBFiles | Number | If the AMTrigger.Action field returns TOO MANY FILES, this value is the total number of files in the directory being monitored. |
AMTrigger.OldFileName | String | If the AMTrigger.Action field returns FILE RENAMED, this value is the original file name. |
AMTrigger.OldFolderName | String | If the AMTrigger.Action field returns FOLDER RENAMED, this value is the original name of the folder. |
AMTrigger.Size | Number | If the AMTrigger.Action field returns ONE FILE TOO BIG, this value is the size (in KB) of the file or folder that activated the trigger. |