Results 1 to 3 of 3
  1. #1
    pradeep_dev is offline Member
    Join Date
    May 2014
    Posts
    1
    Rep Power
    0

    Default How to transfer files from FTP server to SFTP server and SFTP server to FTP server?

    Hello everyone,

    Can anyone please help me out...

    I can able to transfer files from my local system to FTP server(port no:21) with the help of " org.apache.commons.net.ftp " libraries.
    and also I can able to transfer files from my local system to SFTP server(port no:22) with the help of "com.jcraft.jsch.Channel " libraries .
    But, i'm unable to transfer files from " FTP server to SFTP server " and " SFTP server to FTP server "..!

    I hope you understand my Question. Please help me out...

    Thanks inAdvance.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: How to transfer files from FTP server to SFTP server and SFTP server to FTP serve

    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,365
    Rep Power
    6

    Default Re: How to transfer files from FTP server to SFTP server and SFTP server to FTP serve

    Both libraries should have methods that work on streams (inputstream/outputstream); those are what you need. Then you 'simply' transfer bytes from the inputstream to the outputstream like you must know how to do already.

    Alternatively, you could just dumbly download the file locally first and deal with only one server at a time like is suggested in your cross-post on javaprogrammingforums.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 2
    Last Post: 11-24-2013, 10:44 PM
  2. Replies: 2
    Last Post: 12-05-2012, 11:26 PM
  3. Replies: 6
    Last Post: 12-26-2011, 12:33 AM
  4. running program on sftp server not working
    By hardcorebadger in forum New To Java
    Replies: 9
    Last Post: 01-14-2011, 03:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •