On Fri, 2007-11-02 at 09:10 +0200, Denis Bessmertniy wrote:
> Hi,
>
> How is the best to check with FtpClient that file exists on FTP.
String path = "/" + dir ;
client.changeWorkingDirectory(path);
String reply = client.getReplyString().substring(0, 3);
if (reply.equals("250")) {
LOG
.debug("We will now process the path since the server response
code was 250.\n");
} else
LOG
.debug("Ignoring this path, since the server did not return
the 250 success code!\n"
+ "Most likely because the path does not exist.\n");
}
HTH
salu2
>
>
> -
> Denis
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]