This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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: 7892
    
  21

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
 
GeeCON Prague 2014
 
subject: finding ftp client home directory