File System Condition

Description

Monitors the file system for file or folder additions, modifications or deletions and evaluates as TRUE when the specified condition is met. It can be set to monitor a single file, specific files or all files that reside in a folder. It can also be set to monitor file/folder size thresholds. The File System condition can be set as one of the following workflow elements:

NOTE: If monitoring a remote folder or network share, be sure to specify the path in UNC format as opposed to a mapped drive  (i.e. \\serverName\folderName\fileName as opposed to x:\folderName\fileName). Also, make certain that the user account specified in the User tab has at least read access to the remote share.

Practical Usage

Commonly used to monitor folders for incoming files. When these files arrive, they are automatically processed ("processed" could be any combination of copying, reading, uploading etc).

Related Topics  

Parameters

General

Property

Type

Description

Folder

Text

The folder to monitor. Use the Folder button to navigate to the folder to be monitored or manually enter the full path to the desired folder in the field  provided.

NOTE: Use the Filter tab to specify file masks.

Include subfolders

Yes/No

If set to YES, sub-folders will be searched within the parent (main) folder being that's being monitored (set to NO by default).

Wait for file to be accessible  

Yes/No

If set to YES, no action is taken until a file is no longer in use and fully accessible (i.e. unlocked). If set to NO, action is performed on the file even if it is inaccessible or in a locked state (set to NO by default).

Polling interval for remote folders

Number

Determines the length of time that should elapse before the specified condition should be checked (set to 10 seconds by default).

Prerequisites

Property

Type

Description

File added

Yes/No

If set to YES, the condition will monitor for file(s) to be added to the specified folder (set to YES by default).

File removed

Yes/No

If set to YES, the condition will monitor for file(s) to be removed from the specified folder (set to NO by default).

File renamed

Yes/No

If set to YES, the condition will monitor for file(s) to be renamed in the specified folder (set to NO by default).

File modified

Yes/No

If set to YES, the condition will monitor for file(s) to be modified in the specified folder (set to NO by default).

Folder added

Yes/No

If set to YES, the condition will monitor for folder(s) to be added to the specified folder (set to NO by default).

Folder removed

Yes/No

If set to YES, the condition will monitor for folder(s) to be removed from the specified folder (set to NO by default).

Folder renamed

Yes/No

If set to YES, the condition will monitor for folder(s) to be renamed in the specified folder (set to NO by default).

Folder modified

Yes/No

If set to YES, the condition will monitor for folder(s) to be modified in the specified folder (set to NO by default).

Number of files exceeds

Number

The condition evaluates to TRUE when the amount of files in the specified folder exceeds the value entered.

Number of folders exceeds

Number

The condition evaluates to TRUE when the amount of folders in the specified folder exceeds the value entered.

One file size exceeds

Number

The condition evaluates to TRUE when a file in the specified folder exceeds the value entered (in kilobytes).

Folder size exceeds

Number

The condition evaluates to TRUE when the total size of the specified folder exceeds the value entered (in kilobytes).

 

NOTE: Selecting two or more of the above options will make the condition behave as an OR statement as opposed to an AND statement. In other words, execution starts upon the occurrence of any condition selected. For example, enabling the parameter File Added and entering 1 under the parameter Number of files exceeds will activate the condition when a file is added to the specified folder OR when the number of files in the specified folder exceeds the selected amount.    

Filters

Property

Type

Description

Include Mask

String

Specifies the filter(s) to be included in the search. Include Masks can be filtered using a full path and filename or filename only. (i.e. C:\Temp\filename.txt or C:\Temp\*.txt or *.txt). In addition, multiple filters can be specified by using a vertical bar or pipe ("|") (i.e. C:\Temp\*.txt|*.jpg).

Exclude Mask

String

Specifies the filter(s) to be omitted from the search. Exclude Masks can be filtered using a full path and filename or filename only. (i.e. C:\Temp\filename.txt or C:\Temp\*.txt or *.txt). In addition, multiple filters can be specified by using a vertical bar or pipe ("|") (i.e. C:\Temp\*.txt|*.jpg).

Users

If the File condition is monitoring a folder or file location on a network share or drive, or a location with restricted access rights, a user with rights to that location is required. One of the following three options are available:

Property

Type

Description

No user required

Yes/No

If set to YES, specifies that users with proper rights are not required to access the folder being monitored (set to YES by default).

NOTE: Setting this parameter to YES disables all other available parameters.

Use default Agent user

Yes/No

If set to YES, specifies that the default user entered in the Default Task Agent Properties of the agent where the monitored folder resides will be used (set to NO by default).

NOTE: Setting this parameter to YES disables all other available parameters.

Use Username, Password, Domain

Yes/No

Allows a user with proper rights to be entered in the following fields:

  • Default user name - The default user name can be either a plain user name (i.e. sparky), or a username/domain combination (i.e. sparky@networkautomation.com). When the latter form is used, the domain field is disabled.

  • Default password - The password to be used with the default user name specified above. This option can be blank if no password is associated with the selected user.

  • Default domain/machine name - The domain or machine name the user is a member of. This option can be left blank if the user is not a member of a domain or if there is only one workgroup for the machine. These values are also used to replace the special fields of the Logon and Unlock Keystrokes used when logging on or unlocking a workstation.

NOTE:  Setting this parameter to YES disables all other available parameters.

Behavior

The Behavior tab properties dictate how the system should react upon the occurrence of a condition. These properties are significant in determining whether the AutoMate Condition should act as a trigger object (used to fire off workflow execution), wait object (used to suspend workflow execution) or conditional (decision making) object.

More on Condition Behavior

Additional Notes

AMTrigger

When the File System condition is used to trigger workflow execution, it automatically creates an AMTrigger dataset which can be used much like the datasets created by the SQL Query and E-Mail actions. The fields that AMTrigger generates can be used to determine properties of the object that caused the workflow to launch, such as the type of trigger, when the trigger was activated and what system event or condition took place to activate the trigger. Along with a collection of global AMTrigger fields that are created and populated by every instance of AMTrigger, a unique set of AMTrigger fields exclusive to each AutoMate trigger are created as well.

To view AMTrigger values exclusive to the File System condition, see AMTrigger - File System.

AMCondition

When the File System condition is used in the middle of a workflow as wait or conditional object, it automatically creates an AMCondition dataset. Similar to AMTrigger, the fields that AMCondition generates can be used to determine properties of the object that caused the condition to activate. Along with a collection of global AMCondition fields that are created and populated by every instance of AMCondition, a unique set of AMCondition fields exclusive to each AutoMate condition are created as well.

To view AMCondition values exclusive to the File System condition, see AMCondition - File System.

NOTE: A full list of AMTrigger and AMCondition fields exclusive to each trigger/condition can be viewed from Expression Builder by expanding the Objects folder and selecting the desired object from either the Triggers or Conditions folder.