我想将文件从一台 FTP 服务器复制到另一台 FTP 服务器(两台不同的主机)。
Files.copy(
new File(channelSftp.realpath(fileName)).toPath(),
new File(channelSftp2.realpath(fileName)).toPath());
它给出了java.nio.file.NoSuchFileException
有人可以帮我解决这个问题吗?
最佳答案
我已经找到解决方案了,感谢您的帮助。
它正在使用以下代码:
sftp2.put(sftp.get(文件名),文件名);
关于java - Java中将文件从一台FTP服务器复制到另一台FTP服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48508872/