Moving processed files in remote S(ftp) using Java DSL

主宰稳场 提交于 2019-12-01 00:15:33

Perhaps you don't have permissions to do the rename, or the rename failed for some other reason; this exception is an attempt to remove the "to" filename because an initial rename failed. Turn on DEBUG logging and you should see this log...

if (logger.isDebugEnabled()){
    logger.debug("Initial File rename failed, possibly because file already exists. Will attempt to delete file: "
            + pathTo + " and execute rename again.");
}
try {
    this.remove(pathTo);

Since the failure is on this remove() operation, your failure indicates that the rename failed due to some other reason (because clearly the "to" file does not exist).

lrkwz

Take a look at Move file after successful ftp transfer using Java DSL where I deleted the file in the ftpInbound and the reuploaded in the new directory after processing.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!