# 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>`&#x20;

| Argument                             | Description                                                                    |
| ------------------------------------ | ------------------------------------------------------------------------------ |
| <p>\<file name></p><p>(Required)</p> | Provide file name to search particular file                                    |
| <p>\<folder path><br>(Required)</p>  | Provider folder path in which the Action should search for the specified file. |

**Output Value:**&#x20;

| Argument                                 | Description                                              |
| ---------------------------------------- | -------------------------------------------------------- |
| <p>\<Dynamic Variable><br>(Optional)</p> | This variable holds the path of the file                 |
| <p>\<Dynamic Variable><br>(Optional)</p> | 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

<figure><img src="/files/mBVGhFr0GDCA2W1SwilB" alt=""><figcaption></figcaption></figure>

### 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}

{% hint style="info" %}
**Note**: If the same file exists in multiple subfolders within the specified parent folder, the system returns all matching file paths in array format.
{% endhint %}

* 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/generic/file-and-folder-operations/find-file-path.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
