# normalize_pasted_path

> **Function** in `deepagents_code`

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

Normalize pasted text that may represent a single filesystem path.

Supports:

- quoted and shell-escaped single paths
- `file://` URLs
- Windows drive-letter and UNC paths

## Signature

```python
normalize_pasted_path(
    text: str,
) -> Path | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | `str` | Yes | Raw pasted text payload. |

## Returns

`Path | None`

Parsed `Path` if payload is a single path token, otherwise `None`.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/1f5aa621cce7d89395d2db1533f81a299d059a7a/libs/code/deepagents_code/input.py#L473)