Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.

FTP Directory upload?

no avatar
User

adi20ta

Posts

2

Joined

Tue Oct 28, 2008 1:01 am

FTP Directory upload?

by adi20ta » Tue Oct 28, 2008 1:06 am

Hy!
I have to create a program that uploads/downloads files and folders from client to FTP server and back.I used import com.enterprisedt.net.ftp.FileTransferClient; and uploadFile(localFileName, remoteFileName);
The problem occurs when I try to upload a directory with files and folders in it.Do I have to upload it recursively or is there any command line to do that?
Thank you in advance!

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: FTP Directory upload?

by support2 » Tue Oct 28, 2008 6:20 am

There's not a simple way in FileTransferClient. Basically you have to do directory listings and recursively upload.

edtFTPj/PRO has a series of directory transfer methods so if you don't feel like writing the code (it is a bit tricky) then you could try it (http://www.enterprisedt.com/products/ed ... rview.html). Just FYI it is commercial, not open source.

Who is online

Users browsing this forum: No registered users and 22 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron