![Create directory operation configuration in Studio](_images/sftp-create-directory-operation.png)
Create a Directory Using SFTP Connector Example - Mule 4
Anypoint Connector for SFTP (SFTP 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:
-
In the Mule Palette view, search for
sftp
and select the Create directory operation. -
Drag the Create directory operation onto the Studio canvas.
-
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.
-
Specify the connection information and click OK.
-
Set the Directory path field to the new directory’s path name, for example,
~/newFolder
.
The following screenshot shows the Create directory operation configuration:
![Create directory operation configuration in Studio](_images/sftp-create-directory-operation.png)
In the XML editor, the <sftp:create-directory>
configuration looks like this:
<sftp:create-directory doc:name="Create directory" config-ref="SFTP_Config" directoryPath="~/newFolder"/>