FTP/SFTP Connector

FTP/SFTP Connector


The FTP connector operations can handle file transfers over FTP and SFTP protocols.

FTP and SFTP Operations

  • Copy - Copies the file from a source path to a target path.
  • Create Directory - Creates a new directory at a given directory path.
  • Delete - Deletes a file at a given path, provided that it is not locked.
  • List - Lists all files in a given directory path that match a specified matcher, such as file name patterns, dates, locations, and sizes.
  • Move - Moves a file from a given source path to a target path.
  • Read - Reads the file in a given path, sets its content in the payload, and sets its attributes.
  • Rename - Provides a new file name for the a file at a given path.
  • Write - Writes content to a file. It can also map data and perform transformations similar to the Transform component.

Note: This connector module only works with Mule 4 and Studio 7.


Lists files on an FTP server.

  1. Provide a source to your flow, such as a Scheduler trigger with a Fixed Frequency of every 30 seconds (where Frequency = 30 and Time Unit = Seconds).
  2. Set up a List operation for the FTP connector:
    1. Set up or select a configuration for the FTP connector.
    2. Provide the Path (or Directory Path) to the filesExample: /output
  3. After the List operation, add a For Each to your flow. You can retain the default configuration.
  4. Within the For Each component, add a Logger. In Design Center, use the f(x) button to provide this Message: attributes.fileName. In Anypoint Studio, add the following Message to your Logger: #[attributes.fileName]
  5. Deploy or Run your application.
  6. After your application deploys (or is running), check the Logs or Console. You can find the file names in the log, for example: INFO 12:40:49 my_file.txt



Created By
Published On
Aug 12, 2017