Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
7.2k views
in Java FTP by
I am using edtFTP to allow ftp from my site...I would like to know how to change the local directory to which the files are being downloaded today

Can some please help out? :roll:

4 Answers

0 votes
by (162k points)
Supply the full path of the file you want to save to. AFAIK you can't change the current directory of a JVM.

I am using edtFTP to allow ftp from my site...I would like to know how to change the local directory to which the files are being downloaded today

Can some please help out? :roll:
0 votes
by
I am afraid i should have worded the question better...I was talking about the get() method that ftp's the file(s) over from the server to client. On the client side, i want to be able to let the user select the folder to which the selected file(s) should be downloaded to ...Something like the LCD command....

Can you please help? Thanks :?:
0 votes
by (162k points)
If you are writing a GUI you will need to provide a means for the user to navigate to the desired directory, and to select a filename. Then you will have the full path of the file to supply as the local filename in the get() method.

I am afraid i should have worded the question better...I was talking about the get() method that ftp's the file(s) over from the server to client. On the client side, i want to be able to let the user select the folder to which the selected file(s) should be downloaded to ...Something like the LCD command....

Can you please help? Thanks :?:
0 votes
by
Thank you for the reply. However, what if, there is no file in that folder? Then what happens?

Could you please provide an example as to how to provide the whole path in the get() method? I tried ftp.get("//Test//Folder//XYZ" , "test.gif") but this throws exceptions.

Thanks a bunch!

Categories

...