Find File Path
This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to find a file in a given folder location. The retrieved file path is stored in a dynamic variable.
Syntax
Input Value: <file name>;<folder path>
Supported Input Formats:
Text: A fixed value that you manually provide.
Static Value: Provide a value from a data parameter (for example, from an Excel sheet or Data Table).
Dynamic Variable: Value retrieved from a previously stored output variable or dynamically created variable.
<file name>
(Required)
Provide the file name to search for a specific file.
Note: To find the file path of the most recently downloaded file, use the LATEST or latest or Latest word parameter.
<folder path> (Required)
Provide the folder path where the action searches for the specified file.
Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)
<Dynamic Variable> (Required)
This dynamic variable holds the file path.
<Dynamic Variable> (Optional)
This dynamic variable stores the status as True or False.
Example 1: Searching for a File Path by File Name and File Path
In this example, we explain how to search for a file inside a folder.
Action: Find File Path
Input Value: New Orders;C:\Users\john\Downloads
The first argument (New Orders) specifies the name of the file to search for.
The second argument (C:\Users\john\Downloads) specifies the root folder path where the search begins, including all subfolders.
Output Value: {File path}
The file path (e.g., C:/Users/john/Downloads/Wearhouse/New Orders.xlsx) is stored in this {File Path} dynamic variable.
If the second output variable is defined, the action returns the status as True or False:
True: If the file exists in the given folder or any of its subfolders.
False: If the file is not found.
Logical Explanation: The Find File Path action takes the value from the Input Value column (New Orders;C:\Users\john\Downloads) and searches for the specified file within the given folder to identify the most recently downloaded file. The action stores the full file path (C:/Users/john/Downloads/Wearhouse/New Orders.xlsx) in the {File path} variable.

Example 2: Searching the File Path for the Latest Downloaded File
In this example, we explain how to retrieve the most recently downloaded file from a specified folder.
Action: Find File Path
Input Value: latest;C:\Users\john\Documents\Datafile_files
The first argument (latest) instructs the system to identify the most recently downloaded file in the specified folder.
The second argument (C:\Users\john\Documents\Datafile_files) specifies the folder path where the search is performed.
Output Value: {File path}
The file path (e.g., C:/Users/john/Documents/Datafile_files/New Data.xlsx) 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 latest file is successfully identified in the given folder.
False: If the latest 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 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.

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\john\Downloads
The first argument (Employee Data) specifies the file name to search
The second argument (C:\Users\john\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/john/Downloads/Employee Data.docx', 'C:/Users/john/Downloads/Data/Employee Data.docx', 'C:/Users/john/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 or subfolder.
False: If the file is not found.
Logical Explanation: The Find File Path action takes the value from the Input Value column (Employee Data;C:\Users\john\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 (['C:/Users/john/Downloads/Employee Data.docx', 'C:/Users/john/Downloads/Data/Employee Data.docx', 'C:/Users/john/Downloads/EmpData/Employee Data.docx']).

Last updated
Was this helpful?