> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequentum.com/llms.txt
> Use this file to discover all available pages before exploring further.

# File link

> Download images, videos, documents, and other files from links selected on a web page.

The File Link command downloads content from a web page, including images, videos, and documents. It makes the captured files available for access and export. Located under **Extract** in the command palette.

## Example

![Basic File Link command example](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-01.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=2c281fa224009bbb6d1f66c41870b2f7)

## Command properties

![File Link command options](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-02.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=277363eb41c9fc8ed04e9cd45912c5ff)

### File → selected file link

1. **When missing:** Specifies what happens when the selection does not exist on the current page. The default is **Warn**.

   ![File Link missing-selection settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-06.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=d6820e1338bd9acf5cb282f064ba460f)

   * **Fail:** Fails the Agent at this command and stops further execution.
   * **Warn:** Ignores this command and its child commands, and logs a page-load error.
   * **Ignore:** Ignores this command and its child commands.

2. **When hidden or disabled:** Selects visible and disabled elements when set to **Select**. Otherwise, it selects only visible and enabled web elements.

   * **Select:** Selects visible and disabled elements that match the XPath.
   * **Ignore:** Selects only when the XPath selection is present and the web element is enabled.

3. **Selected file link:** Shows the content selected by the command on the current page. If the selection is missing or no content is selected, it displays **No selected Content**.

![Selected file link](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-07.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=9b506f7c047a48a0b214e38b750e4241)

### File → file name input

Use **File name** to select the source for the downloaded file's name. The default source is **Action Result**.

* **Action Result:** Derives the file name from an action result. Available results are:

  * **Captured File:** Provides the file name and its size in square brackets. A transformation can further customize the value.
  * **Captured File Name:** Provides the captured file's name. A transformation can further customize the value.
  * **Is Error:** Returns `false`. A transformation can further customize the value.
  * **Page URL:** Provides the page URL. A transformation can further customize the value.
  * **Page URL File Name:** Provides the file name from the page URL. A transformation can further customize the value.
  * **Return Code:** Provides the command status code, indicating whether the command executed successfully. A transformation can further customize the value.
  * **Proxy:** Provides the proxy server used for the request. A transformation can further customize the value.

![Action Result file-name settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-08.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=c101bef5c663a715c5193b5e5d6f1466)

* **Command:** Derives the file name from values produced by parent commands. A transformation can further customize the value.

![Command file-name settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-09.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=52bd4bb58e9883c16869c98556c1ea27)

* **Agent Parameter:** Derives the file name from an Agent input parameter. A transformation can further customize the value.

![Agent Parameter file-name settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-10.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=d47e996d7772e17c2798000a170920b3)

* **Static Value:** Uses a file name entered manually. A transformation can further customize the value.

![Static Value file-name settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-11.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=154838209f23cf485d39dbf13d3f316b)

* **Script:** Uses a Regex, JavaScript, C#, or Python script to create a dynamic, context-specific file name.

![Script file-name settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-12.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=8cab592f8ff13eb20d31d53fa75b263f)

* **Data List:** Derives the file name from a selected column in a Data List command. A transformation can further customize the value.

![Data List file-name settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-13.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=8048952316d6716ba9dd659f0242a0d0)

### Capture → capture settings

See [Capture → capture settings](https://docs.sequentum.com/agents/commands/extract/content.md#capture-%E2%86%92-capture-settings) for more information.

### Error handling

See the legacy [Error Handling](https://docs.sequentum.com/agents/commands/properties/error-handling.md) section for more information.

### Timeouts → file download timeouts

**File Download Timeouts:** Specifies how long a file may take to download before the process is terminated. Adjust the timeout to manage slow connections and prevent indefinite waits.

* **Timeout (seconds):** Sets the number of seconds allowed for the download. A value of `0`, the default, disables the timeout and lets the download continue until it completes.

![File download timeout settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/file-link/img-14.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=d1a8fa9625965bada12b8270141daa43)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.