---
id: "T:cAlgo.API.OpenFolderDialog"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/"
---

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

# OpenFolderDialog (class)

Represents a common dialog box that allows the user to open one or more folders.

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.

## Definition

```csharp
public class OpenFolderDialog
```

Available since cAlgo.API 5.1.

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo.Robots;

public partial class TestExample : Robot
{
    protected override void OnStart()
    {
        var openFolderDialog = new OpenFolderDialog
        {
            Title = "Select File(s)",
        };

        var result = openFolderDialog.ShowDialog();

        if (result == FileDialogResult.Cancel)
            return;

        Print(openFolderDialog.FolderName);
    }
}
```

Python:

```python
import clr

clr.AddReference("cAlgo.API")

# Import cAlgo API types
from cAlgo.API import *
# Import trading wrapper functions
from robot_wrapper import *

class Test():
    def on_start(self):
        openFolderDialog = OpenFolderDialog()
        openFolderDialog.Title = "Select File(s)"
        result = openFolderDialog.ShowDialog()

        if result == FileDialogResult.Cancel:
            return

        api.Print(openFolderDialog.FolderName)
```

config.json:

```json
{
  "AccessRights": "None"
}
```

## Constructors

- `public OpenFolderDialog()` — Creates an OpenFolderDialog. [details](https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/Constructor/index.md)

## Methods

- `public void Reset()` — Resets all dialog properties to their default values. [details](https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/Reset/index.md)
- `public FileDialogResult ShowDialog()` — Shows a file dialog, with the owner as the main Window [details](https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/ShowDialog/index.md)
- `public FileDialogResult ShowDialog(Window owner)` — Shows a file dialog, with the passed owner window. [details](https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/ShowDialog/index.md)

## Properties

- `public string FolderName {get;}` — Gets a string containing the full path of the folder selected in an open folder dialog. [details](https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/FolderName/index.md)
- `public string InitialDirectory {get; set;}` — Gets or sets the initial directory that is displayed by a file dialog. [details](https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/InitialDirectory/index.md)
- `public string Title {get; set;}` — Gets or sets a string shown in the title bar of the dialog. If this property is null, a localized default from the operating system itself will be used. [details](https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/Title/index.md)

