Condition - File
The File condition checks whether a file exists, or what a file contains, on the Server computer or on a network share the Server can reach. Use it, for example, to run a Job only when an input file has arrived, or to stop when a file contains an error marker.
This page describes the File tab of the Add/Edit condition window. For the Main settings tab of the window (Condition type, Description, Active), see Conditions - Conditions.
Server -> Global objects -> Conditions -> Add -> Conditions tab -> Add -> Condition type "File" -> File tab

File information
File path
The full path of the file, as the Server sees it: a local path on the Server computer, or a UNC path such as \\<server>\<share>\<file>. Click the browse button to the right of the box to select a file. You can use Variables in the path, see Global - Variables. The window does not let you save the condition with an empty path.
The Client can replace a path on a mapped network drive with its UNC path as you type. It does this when the Client runs on the Server computer and the Client setting Auto translate to UNC path is checked, which is the default.
Credential
Select a Credential when the Server needs another Windows account to reach the file, for example on a network share. See Global - Credentials. Leave "No Credential" to check the file with the account the VisualCron service runs under. Use the Filter.. box to search the list. To manage Credentials, click the button to the right of the Filter.. box.
If the selected Credential no longer exists, or the Server cannot log on with it, the condition returns a Match Error and an error is logged.
Match
Select one check. The default is File exists with "True".
File exists
Select "True" to match when the file exists, or "False" to match when it does not. The file name part of File path can contain the wildcards "*" and "?". The check then finds the file when at least one file in that folder matches the pattern. Subfolders are not searched.
File exists cannot tell a missing file from a path the Server cannot reach. If the share is offline, or the account has no access to it, the check reports that the file does not exist: "True" does not match and "False" matches. Do not rely on "False" alone to decide that a file is absent from a network path. When the file name contains a wildcard, a folder that does not exist, or that the Server cannot reach or read, gives a Match Error instead.
File content
Reads the whole file and compares it with the text in the box to the right:
- "Is": the content equals the text
- "Is not": the content differs from the text
- "Contains": the content contains the text
- "Not contains": the content does not contain the text
The comparison is case-sensitive. "Is" and "Is not" compare the entire file, including line breaks at the end, so a file that ends with a line break does not equal the same text without one. The file is read as UTF-8 text. You can use Variables in the text.
If the file does not exist or cannot be read, or if File path contains a wildcard, the condition returns a Match Error and an error is logged. The window asks you to confirm before it saves an empty text.