---
schema_version: "1"
id: c735d0666ec11ed152c857d4aa0cfc5b59533ad76176708c03b5673dc0b7c59c
title: Create a Directory Using File Connector Example
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/file-connector/latest/file-create-directory.md
canonical_url: https://docs.mulesoft.com/file-connector/latest/file-create-directory
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 50f737c6ec6b2ec1884f138a10ccb099da9e4ef17cb1ee378db91946504516b2
description: MuleSoft Documentation Site
release: "1.5"
latest: true
---
---
product: File Connector
version: 1.5
is-latest-version: true
---

# Create a Directory Using File Connector Example

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Connector for File (File Connector) provides a **Create directory** operation that enables
you to create a directory of a given name.

If the reason for creating the directory is to immediately write, copy, or move content to the
directory, then use the **Write**, **Copy**, or **Move** operations with the **Create parent
directories** field set to **TRUE**.

## Configure the Create Directory Operation in Studio

To add and configure the **Create directory** operation in Studio, follow these steps:

1.  In the **Mule Palette** view, search for `file` and select the **Create directory** operation.

2.  Drag the **Create directory** operation onto the Studio canvas.

3.  In the **General** tab of the operation configuration screen, click the plus sign (**+**) next
    to the **Connector configuration** field to access the global element configuration fields.

4.  Specify the connection information and click **OK**.

5.  Set **Directory path** to the new directory’s path name, for example, `~/newFolder`.

![Create directory operation configuration in Studio](/mulesoft/current/en-us/file-connector/latest/_images/file-create-directory-operation.png)

In the **Configuration XML** editor, the `<file:create-directory>` configuration looks like this:

```xml
<file:create-directory doc:name="Create directory"  config-ref="File_Config" directoryPath="~/newFolder"/>
```

## See Also

- [File Connector Examples](https://docs.mulesoft.com/file-connector/latest/file-examples)

- [Salesforce Help](https://help.salesforce.com)
