File Exists
Description
File Exists checks whether a file or folder exists on the file system using a path provided by a previous step. Use this step when your workflow needs to verify that an expected file is present before attempting to read or process it — for example, confirming a data feed has arrived or checking that an output directory exists. The step adds a Boolean result field to the data stream that you can use to branch the workflow with a Filter Rows step.
Configurations
| Field Name | Description |
|---|---|
| Step name | Specify the name of the step as it appears in the workflow workspace. This name has to be unique in a single workflow. |
| Filename field (RegExp) | Specify the input field that will contain the filename at runtime Note: The field supports regular expressions for the last segment (node) of the file path. For example, C:\\Users\\Documents\\Project\\files\\file_*.txt, the regular expression will only apply to the file_*.txt segment.Wild Cards Example: 1. * : Matches zero or more characters in the last segment. Path: C:\Users\Documents\Project\files\file_*.txtExplanation: To match any file in the folder, that starts with file_ and has a .txt extension. 2. ? : Matches exactly one character in the last segment. Path: C:\Users\Documents\Project\files\file_?.txt Explanation: To match any file in the folder where file_ is followed by exactly one character and ends with .txt, such as file_a.txt, file_1.txt 3. [abc] : Matches any one of the specified characters in the brackets. Path: C:\Users\Documents\Project\files\file_[abc].txt Explanation: To match any file in the folder where file_ is followed by a, b, or c and ends with .txt, such as file_a.txt,or file_b.txt, or file_c.txt |
| Result fieldname | Specify the name of the field that will contain the boolean flag. |
| Add filename to result | Enable checkbox if you want to add the filename to the list of filenames that can be used in the next process entry. |
| Include file type | Enable checkbox to specify the file type in a field. |
| File type field | Specify the name of the field that will contain the file type as a String: "file", "folder", "imaginary" |