# Directory operations

### Check if directory exists

Determains whether directory at specified path exists.

| Parameter | Description        |
| --------- | ------------------ |
| Path      | The path to check. |

**Output**: Simple value,*True* if directory exists. *False* otherwise.

**Since**: 6.3

### Create directory

Creates a directory at the FTP server. It is not possible to create several levels of directories in one step. If you want to create the directory *./dirA/dirB*, the directory *./dirA* must exist. Otherwise you have to do it in two steps; first creates directory *./dirA* and the second one created *./dirA/dirB*.

| Parameter   | Description                      |
| ----------- | -------------------------------- |
| Remote path | Path to the directory to create. |

**Output**: No output.

**Since**: 6.3

### Delete empty directory

Deletes specified empty directory. Note if directory contain a file it will return an error.

| Parameter   | Description                 |
| ----------- | --------------------------- |
| Remote path | Path to directory to delete |

**Output**: No output.

**Since**: 6.3

### List directory

Lists all files and directories in a specified path.

| Parameter           | Description                                                                                                                                                                                           |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Remote path         | Path to list.                                                                                                                                                                                         |
| Mask                | Mask to use when filtering items in directory. Example *\*.txt*. Regular expressions can also be used by prefixing with *regex:*, example regex:\[A\|B].\* to list all files starting with *A* or *B* |
| Case sensitive      | Specifies whether to ignore casing or not.                                                                                                                                                            |
| Include files       | Specifies whether to include files in the listing.                                                                                                                                                    |
| Include directories | Specifies whether to include directories in the listing.                                                                                                                                              |
| Recursive           | Specifies whether to also search in subdirectories.                                                                                                                                                   |

**Output**: A table consisting of records with the following structure:

| Member | Description                        |
| ------ | ---------------------------------- |
| Name   | The name of the file or directory. |
| Size   | The size, in bytes, of the item.   |

**Since**: 6.3


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.novacuraflow.com/connectors/areas/communication/ftp/directory-operations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
