Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

transfer file

  Asked By: Bonni    Date: Aug 25    Category: Java    Views: 762
  

Does anyone knows how to transfer copy of file from server to client,
for example transfer "friend.dat" from server (123.456.78.89) to
client (123.456.78.100)

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Marc Anderson     Answered On: Aug 25

use the "ftp" command. Most implementations I've seen so far are
capable of working when called in a script, so the easiest thing you
can do in Java is generate a script file  (under Windows a .BAT file)
which contains user name and password for the FTP connection, sets to
no-prompt mode, sets ftp to binary or ASCII mode (whichever is
appropriate), and finally transfers the necessary file(s). Then you
simply call FTP by (usually) executing something like this:
Runtime .exec( "ftp <" + scriptFileName);

 
Didn't find what you were looking for? Find more on transfer file Or get search suggestion and latest updates.




Tagged: