aspose file tools*
The moose likes Java in General and the fly likes finding ftp client home directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "finding ftp client home directory" Watch "finding ftp client home directory" New topic
Author

finding ftp client home directory

Kevin Wong
Greenhorn

Joined: Mar 28, 2009
Posts: 12
Hi All

I am wondering if there is a Java function/api I can use to find the current home directory of a ftp client.
I am trying to find a way to find the absolute directory file path of some some files, that are in the ftp client directory.

I am trying to copy these files into a network shared directory using java.

I have been searching the ftp commands and there does not seem to be any relevant ftp command.

Regards
Kevin Wong
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8008
    
  22

Kevin Wong wrote:I am wondering if there is a Java function/api I can use to find the current home directory of a ftp client.
I am trying to find a way to find the absolute directory file path of some some files, that are in the ftp client directory.

I am trying to copy these files into a network shared directory using java.

I have been searching the ftp commands and there does not seem to be any relevant ftp command.

There are certainly FTP clients for Java, but unless the target specifically allows it you won't be able to get any information about its directories (it defeats the whole purpose of the protocol).
If you want to copy files to the FTP server's home directory, just use the product; if you want to find information about the target's filesystems, you'll have to find another way (and make sure it's legal ).

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: finding ftp client home directory