# agent adl file list

List files in an Agentforce Data Library.

## Description for agent adl file list

Returns the list of files in an SFDRIVE library including file name, size, and creation date.

## Flags

| Flag Name (Long) | Flag Name (Short) | Description                                                                                                                                                 |
| ---------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--api-version`  | N/A               | **Type:** Value<br><br>Override the api version used for api requests made by this command                                                                  |
| `--flags-dir`    | N/A               | **Type:** Value<br><br>Import flag values from a directory.                                                                                                 |
| `--json`         | N/A               | **Type:** Boolean<br><br>Format output as json.                                                                                                             |
| `--library-id`   | `-i`              | **Type:** Value<br>**Required**<br><br>Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).                                                  |
| `--offset`       | N/A               | **Type:** Value<br><br>Number of files to skip before returning results (for pagination).                                                                   |
| `--page-size`    | N/A               | **Type:** Value<br>**Default value:** `50`<br><br>Number of files to return per page (1-200, default 50).                                                   |
| `--status`       | N/A               | **Type:** Value<br>**Valid Values:** `uploaded`, `indexing`, `indexed`, `index_failed`, `deleting`, `delete_failed`<br><br>Filter files by indexing status. |
| `--target-org`   | `-o`              | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set.         |

## Examples for agent adl file list

List files in a data library:

```shell
sf agent adl file list --library-id 1JDSG000007IbWX4A0 --target-org myOrg
```

List files and output as JSON:

```shell
sf agent adl file list --library-id 1JDSG000007IbWX4A0 --target-org myOrg --json
```
