Contact Us 1-800-596-4880

Create a Directory Using FTP Connector Example - Mule 4

Anypoint Connector for FTP (FTP 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 ftp 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

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

<ftp:create-directory doc:name="Create directory"  config-ref="FTP_Config" directoryPath="~/newFolder"/>
View on GitHub