You should give the port on which the ftp server is running. "sftp://username:password@hostname:*port*/home/folder1"
On Thu, Oct 11, 2018 at 12:56 PM, Aman Singh <[email protected]> wrote: > Hi, > > I am trying to copy files of any format(xml,json etc) placed in my server. > I want to copy all files from my server to local machine. > > The code for copying the file I am using is :- > > <proxy name="TestProxy" startOnLoad="true" transports="http https" xmlns=" > http://ws.apache.org/ns/synapse"> > <target> > <inSequence> > <fileconnector.copy> > <source>sftp://username:password@hostname/home/folder1/</ > source> > <destination>file:///D:/WSO2FilesTest</destination> > <filePattern>.*.*</filePattern> > </fileconnector.copy> > </inSequence> > <outSequence/> > <faultSequence/> > </target> > </proxy> > > But I am getting the error as "Could not list the contents of > "sftp://username:***@hostname/home/folder1" because it is not a folder." > > The file does exist inside of the folder1. > > What do I need to change in my code? > > Thank you, > Aman > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Thishani Lucas* *Software Engineer* *WSO2 Lanka (Private) Limited**: http://wso2.com <http://wso2.com/>* *lean.enterprise.middle-ware* *Tel: +94 77 2556931 * *LinkedIn: https://www.linkedin.com/in/thishani-lucas/ <https://www.linkedin.com/in/thishani-lucas/>* <http://wso2.com/signature>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
