---
id: "M:cAlgo.API.FileAssociations.Remove(System.String)"
kind: "method"
type: "T:cAlgo.API.FileAssociations"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Remove/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# FileAssociations.Remove

Member of [FileAssociations](https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/index.md).

## Remove(string fileExtension)

Removes a file extension from the list of associations.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
void Remove(string fileExtension)
```

Python:

```python
api.FileAssociations.Remove(fileExtension: str) -> None
```

### Parameters

- `fileExtension` (`string`, Python `str`): File extension with dot, ex: .pdf

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
FileAssociations.Remove(".mydata");
Print("Still associated: {0}", FileAssociations.Contains(".mydata"));
```

Python:

```python
api.FileAssociations.Remove(".mydata")
api.Print(f"Still associated: {api.FileAssociations.Contains('.mydata')}")
```

