File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes FTP Folder Upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "FTP Folder Upload" Watch "FTP Folder Upload" New topic

FTP Folder Upload

saravanan palanivel

Joined: Sep 05, 2012
Posts: 9
Hi I am trying FTP for folder upload. In that I choose the folder from my local machine , and its need to be uploaded to the FTP Server. I tried JFileChooser but it working to select files only, not a folder. is there any way to upload a folder to Ftp Server. please help me...
Kapish M Joshi

Joined: Sep 12, 2012
Posts: 10


There are very rare ways of doing it, better i would suggest you copy program which can copy a directory structure to FTP. Here is an example for this:


Apart from this solution the other option can be like, Parsing the directory and accordingly create folders at remote FTP server using your java program and then copy the files to that folder created at FTP server. Even if it doesn't work last solution that i usually prefer is compress the folder with its content and send it to remote machine.

Kapish M Joshi| | InfoCepts
I agree. Here's the link:
subject: FTP Folder Upload
It's not a secret anymore!