Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3k views
in Java FTP by (120 points)
Dear Friends:

I tried to use FTP to connect to the FTP server, all ok, I can put/ get a single file to/from FTP server slao.
But I fail to mget and mput,
see following code:

String[] files = ftp.dir(".", true);
 
           System.out.println("Now ftp is Getting file files.length= " + files.length);
           for (int i = 0; i < files.length; i++){
 
              System.out.println("Now ftp is getting a file...files["+i+"] =" + files[i]);
         ftp.put("/temp/ftp/out",files[i]);
            }



here ftp.put commands failed.



How to use FTP to mget all files from FTP server??

Please help.
Thanks a lot!!!
sunny

1 Answer

0 votes
by (162k points)
Your code looks like you are trying to mget. Why are you using put instead of get in the loop?

Categories

...