You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mihael Knezevic <m....@porta.de> on 2005/02/01 15:10:30 UTC
[Net] FTPClient method rename not working
hi,
sorry if this is on old one, but i'm starting to use the commons-net java
library and i'm trying to rename a file on a server. i tried the rename
function but that returned my only
550 Renaming attempt failed.
in the reply string (getReplyString method).
i took a look at the source code of the method and there were only some lines:
public boolean rename(String from, String to) throws IOException
{
if (!FTPReply.isPositiveIntermediate(rnfr(from)))
return false;
return FTPReply.isPositiveCompletion(rnto(to));
}
i copied the lines and changed the variables and it worked. both function
calls of FTPReply returned true. so why does the rename method returns false?
i'm using commons-net 1.3.0 and a ftp server on an iseries (os400).
thanx in advance.
mk
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org