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

# Replace File Extension

> AI context for Replace File Extension. Not linked in navigation.

> This page is for AI assistant context only. To use this package, visit [community.ntop.com](https://community.ntop.com/packages/ntop/replace-file-extension).

## Summary

This custom block replaces the file extension of a file path with an option to add a suffix before the extension.

## Package Details

| Field            | Value                                                   |
| ---------------- | ------------------------------------------------------- |
| **ID**           | `replace-file-extension`                                |
| **Type**         | Block                                                   |
| **Author**       | nTop                                                    |
| **Version**      | 1.0.0                                                   |
| **nTop Version** | 5.44+                                                   |
| **Domain**       | Geometry                                                |
| **Complexity**   | Beginner                                                |
| **Tags**         | `file-path`, `extension`, `string`, `utility`, `suffix` |
| **License**      | MIT                                                     |
| **Verified**     | Yes                                                     |

***

This custom block replaces the file extension of a file path with an option to add a suffix before the extension.

## Installation

Clone this repo or copy the package folder into your nTop workspace:

```bash theme={null}
git clone https://github.com/nTopology/Utilities.git
```

The package lives at `packages/ntop/replace-file-extension/`.

## Inputs

| Name            | Type       | Description                                                  |
| --------------- | ---------- | ------------------------------------------------------------ |
| `Path`          | file\_path | Original path                                                |
| `New extension` | Text       | New file extension                                           |
| `Suffix`        | Text       | Optional suffix to add to the path before the new extension. |

## Outputs

| Name       | Type       | Description                             |
| ---------- | ---------- | --------------------------------------- |
| `New Path` | file\_path | Adds the new extension to the file name |

## License

MIT.

***

## Source

[https://community.ntop.com/packages/ntop/replace-file-extension](https://community.ntop.com/packages/ntop/replace-file-extension)
