---
id: "P:cAlgo.API.OpenFileDialog.FileNames"
kind: "property"
type: "T:cAlgo.API.OpenFileDialog"
url: "https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/FileNames/"
---

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

# OpenFileDialog.FileNames

Member of [OpenFileDialog](https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/index.md).

## FileNames

Gets an array that contains one file name for each selected file.

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

- CLI: No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored.
- Cloud: No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored.

C#:

```csharp
public string[] FileNames {get;}
```

Python:

```python
openFileDialog.FileNames: list[str]
```

### Returns

`string[]` — 

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
var openFileDialog = new OpenFileDialog { Multiselect = true };
if (openFileDialog.ShowDialog() == FileDialogResult.OK)
{
    foreach (var fileName in openFileDialog.FileNames)
        Print("Selected: {0}", fileName);
}
```

Python:

```python
openFileDialog = OpenFileDialog()
openFileDialog.Multiselect = True
if openFileDialog.ShowDialog() == FileDialogResult.OK:
    for fileName in openFileDialog.FileNames:
        api.Print(f"Selected: {fileName}")
```

