Mule SFTP: how to create directories on a remote location

I am trying to send a file via SFTP using mule. We have to give it a fixed path like / home / ftp / and then the filename in the outputpattern. but I want to create directories on the fly in a remote location. every time a file is uploaded, it should be uploaded to a new directory.

like abc.txt: /home/ftp/abc/abc.txt

pqr.txt: /home/ftp/pqqw/pqr.txt

+3


source to share


2 answers


I have implemented this by overriding FtpMessageDispatcher

in MULE. Here is a blog post about it



+1


source


I would say that you need a custom java component to create this folder.



http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/sftp/SftpClient.html#createSftpDirIfNotExists(org.mule.api.endpoint.ImmutableEndpoint,%20java.lang.String)

0


source







All Articles