apache FTPClient FTP如何实现文件移动?

如题:
现在的情况是,我需要在FTP服务器上做这样的操作:A文件夹移动到 B文件夹的子目录..

看了网上说的用rename移动,根本不行,有经验的大哥大姐们,支个招..

问题已解决: 感谢 "不是阿尔伯特" 的指点..


private static String downLoadPath = "/主文件/"; 

String tempStr = fNames[i];
String simpleName = tempStr.substring(0,tempStr.lastIndexOf("."));

String movePath = "";
 if(typeCode.equals("0")){
               movePath = FTP_ORDER;  
 }else if(typeCode.equals("1")){
               movePath = FTP_TAXBILL;  
}else if(typeCode.equals("2")){
               movePath = FTP_WAYBILL;  
}else if(typeCode.equals("3")){
               movePath = FTP_GOODS;  
}

String oldName = downLoadPath+simpleName+".xml";
String newName = movePath+simpleName+"2a.xml";

logger.info(oldName);
logger.info(newName);

boolean bools = ftp.changeWorkingDirectory(downLoadPath);

logger.info(bools);

// boolean bool = ftp.rename("a.txt","b");
int RNFR = ftp.sendCommand(FTPCmd.RNFR,oldName);
int RANTO = ftp.sendCommand(FTPCmd.RNTO,newName);

logger.info(RNFR +"\t"+ RANTO);