Find File Path
The Find File Path action under the @Generic Element is used to find a file in a given folder location and store the result in an dynamic variable.
Syntax
Input Value: <file name>;<folder path>
<file name>
(Required)
Provide file name to search particular file
<folder path> (Required)
Provider folder path in which the Action should search for the specified file.
Output Value:
<Dynamic Variable> (Optional)
This variable holds the path of the file
<Dynamic Variable> (Optional)
This variable stores the status as true or false
Example
Search for a document in a nested folder structure The Find File Path action supports searching for files even within nested subfolders inside the provided folder path (e.g., New Orders.txt;C:\sam). Once found, the full path of the file is stored in the {File path} variable, and the action status is saved in the {Status} variable with the following possible values:
True – if the file is found in the given folder or its subfolders
False – if the file is not found or access to the folder is denied

Example 3: Searching File Path When the Same File Exists in Different Locations
In this example, we explain how the system behaves when the same file exists in different folder locations.
Action: Find File Path
Input Value: Employee Data;C:\Users\jhon\Downloads
The first argument (Employee Data) specifies the file name to search
The second argument (C:\Users\jhon\Downloads) specifies the system which folder to start searching from. The system searches across folders under the specified path.
Output Value: {File path}
Note: If the same file exists in multiple subfolders within the specified parent folder, the system returns all matching file paths in array format.
The file path (e.g., ['C:/Users/jhon/Downloads/Employee Data.docx', 'C:/Users/jhon/Downloads/Data/Employee Data.docx', 'C:/Users/jhon/Downloads/EmpData/Employee Data.docx']) is stored in this {File Path} dynamic variable.
If a second output variable is provided, the action returns the status as True or False:
True: If the file is successfully identified in the given folder.
False: If the file is not found.
Logical Explanation: The Find File Path action takes the value from the Input Value column (latest;C:\Users\John\Documents\Datafile_files) and scans the specified folder to identify the most recently modified or downloaded file. Once found, the action stores the full file path (C:/Users/John/Documents/Datafile_files/New Data.xlsx) in the {File path} variable.
Logical Explanation: The Find File Path action takes the value from the Input Value column (Employee Data;C:\Users\jhon\Downloads) and scans the specified folder and its subfolders to search for the file named Employee Data. If the same file exists in multiple folders within the given location, the action collects all matching file paths and stores them in the {File path} variable in array format.
Last updated
Was this helpful?