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

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

# OpenFolderDialog.InitialDirectory

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

## InitialDirectory

Gets or sets the initial directory that is displayed by a file dialog.

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 InitialDirectory {get; set;}
```

Python:

```python
openFolderDialog.InitialDirectory: str
```

### Returns

`string` — 

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
var openFolderDialog = new OpenFolderDialog { InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) };
openFolderDialog.ShowDialog();
```

Python:

```python
from System import Environment
openFolderDialog = OpenFolderDialog()
openFolderDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
openFolderDialog.ShowDialog()
```

