Search code examples
javaspringftpspring-integrationftp-server

Transfer file from ftp Server to another ftp server using spring integration ftp support


I am new to Spring and I am currently working on spring integration with ftp support.

  • I made a transfer from local directory to a server(filZilla).
  • I downloaded the file from server and it was fine.

But I want to find how I can Transfer file from FTP Server to another FTP Server and if it's possible to read file without downloading it from the server.


Solution

  • If you mean fetch a file and send it to another server without writing it to the local file system then, no, that's not currently possible with standard components.

    However, you can use two FtpRemoteFileTemplates (use the execute method) to stream the data from an InputStream to an OutputStream.