# parse_pasted_file_paths

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/input/parse_pasted_file_paths)

Parse a paste payload that may contain dragged-and-dropped file paths.

The parser is strict on purpose: it only returns paths when the entire paste
payload can be interpreted as one or more existing files. Any invalid token
falls back to normal text paste behavior by returning an empty list.

Supports common dropped-path formats:

- Absolute/relative paths
- POSIX shell quoting and escaping
- `file://` URLs

## Signature

```python
parse_pasted_file_paths(
    text: str,
) -> list[Path]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | `str` | Yes | Raw paste payload from the terminal. |

## Returns

`list[Path]`

List of resolved file paths, or an empty list when parsing fails.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/a9e6e4f7ad7fe161dd9affc3d74bb19784aca70b/libs/cli/deepagents_cli/input.py#L334)