Hi All, I am developing FTP code with the help of org.apache.commons.net.ftp. My reqirement is To display all the directory names form a particular folder from server(remote) machine.I cant able to find any method like this in org.apache.commons.net.ftp api.So,Please help me in this regard. THANKS IN ADVANCE.. -Ravi Kumar
You can use one of the FTPClient.listFiles methods to obtain an array of all files in a directory. Then you can check whether each entry is a file or directory by using the FTPFile.getType method, and ignore evertyhing that's not a directory.
Hi Ulf, Thanks a lot for your reply.Now I got the directory names like the below from the remote unix box: drwxrwxrwx 2 bslops1 dstage 512 Sep 26 13:26 cmdb drwxrwxrwx 2 bslops1 dstage 1024 Sep 21 12:27 hydqdw drwxrwxrwx 2 bslops1 dstage 1024 Sep 26 13:46 hydstg
But I want only directory names.Please tell me how to get it. THANK U VERY MUCH IN ADVANCE -RAVI KUMAR
Hi All, I want to develop java code to upload files(not through FTP) and I dont want to use third party tool.Any body can please tell me how can I do that?Please send me sample codes if any. THANKS IN ADVANCE
-Ravi Kumar.
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way: