Description:
The Check if File Exists step enables a FlowWright workflow to verify whether a specified file exists on a local drive, mapped network drive, or accessible shared location.
This step is commonly used before reading, copying, moving, deleting, processing, or importing files. By confirming the existence of a file before performing these operations, workflows can avoid execution failures, improve reliability, and provide meaningful handling when expected files are unavailable.
The step evaluates the configured file path and determines whether the specified file exists. Based on the result, the workflow follows either the True or False execution path.
Typical uses include:
- Verifying incoming import files
- Checking exported report files
- Confirming document availability
- Validating attachment locations
- Verifying integration files
- Checking backup files before processing
- Preventing file system errors
This step is especially useful in automated workflows that depend on files generated by external systems or previous workflow activities.
Inputs
- File Path– Specifies the complete path of the file to verify. The value may be entered directly or supplied through a workflow variable or global variable.
Returns
- True – The specified file exists and is accessible. Workflow execution continues through the success path.
- False – The specified file does not exist or cannot be located. Workflow execution follows the alternate path for error handling or corrective action.
Usage:
The Check if File Exists step is typically used immediately before any workflow activity that requires access to a specific file.
During execution:
- Read the configured file path.
- Verify whether the file exists.
- If the file exists, continue through the True path.
- If the file does not exist, continue through the False path and perform appropriate handling.
A typical workflow might look like this:

Typical workflow scenarios include:
- Validating uploaded documents
- Checking files received from external systems
- Confirming report generation before distribution
- Verifying archive files before restoration
- Checking configuration files before application startup
- Confirming invoice files before import
- Validating attachments before sending email notifications
Example:
Let’s build and execute the “fileExistDef” example.
- Create a new process definition named “fileExistDef” and open it in designer mode.
- Drag a “fileExist and placeHolders” step to the canvas.
- Connect the dots between the “Start” and other steps, as shown above. Click the connection link to configure the “TRUE and FALSE” workflow paths.
- Click the "fileExist" step to configure its "Required" properties. Provide a name for the step and the file path on the application server. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance. The step verifies the file's existence and follows the “TRUE or FALSE” path as configured. Here, the workflow follows the “TRUE” path because the file exists.

Tips:
- Store frequently used file paths in workflow variables or global variables to simplify deployment across environments.
- Validate file existence before performing read, copy, move, delete, or import operations.
- Route the False path to notification, retry, or recovery logic to improve workflow reliability.
- Use UNC paths when accessing files located on shared network resources.
- Ensure the FlowWright service account has sufficient permissions to access the specified file.
- Combine this step with Check if Folder Exists to verify both the directory and the target file before processing.
- Combine this step with Read File, Copy File, Move File, Delete File, CSV Input File, XML Input File, or Send Email steps to build reliable file-processing workflows.
Notes:
- The file path is required before the step can execute.
- The step verifies only the existence of the specified file; it does not open, modify, or validate its contents.
- Accessibility depends on the permissions of the account under which the FlowWright workflow is executing.
- A False return may indicate that the file does not exist, the path is incorrect, or the file cannot be accessed because of permission or network issues.
- Both the True and False return paths should be implemented to provide complete workflow handling.
- Execution details and file validation results are recorded in the FlowWright workflow execution log.
Check if File Exists vs. Check if Folder Exists:
Both workflow steps validate file system resources, but they are designed for different purposes.
| Check if File Exists | Check if Folder Exists |
|---|---|
| Verifies whether a specific file exists. | Verifies whether a directory exists. |
| Used before file-based operations such as reading, importing, copying, or deleting files. | Used before operations that require an existing folder, such as exporting or storing files. |
| Validates the complete file path. | Validates the folder path only. |
| Returns True or False based on file existence. | Returns True or False based on folder existence. |
As a general guideline:
- Use Check if File Exists when a workflow must verify that a specific file is available before processing.
- Use Check if Folder Exists when a workflow needs to verify that a directory exists before creating, storing, or searching for files.
Definition Sample:
You may download the sample workflow definition from the link provided and import it into your FlowWright environment.
Note: Verify and complete any missing configuration after importing the sample, including:
- File path
- Workflow variables or global variables (if used)
- Success and failure workflow branches
- Notification or recovery logic
- Appropriate file system permissions
After verifying the configuration, save and publish the workflow before execution.