java 如何使用java重命名ftp服务器中的文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1211953/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 15:39:14  来源:igfitidea点击:

How to rename a file in ftp server using java

javaftp

提问by Jineesh

I wanted know

我想知道

How to rename a file in ftp server using java.

如何使用java重命名ftp服务器中的文件。

I am using java.net.URLto connect to the server

我正在使用java.net.URL连接到服务器

Thanks

谢谢

回答by Tommy

Use Apaches FTPClient. Its much easier

使用 Apaches FTPClient。它更容易

http://commons.apache.org/net/

http://commons.apache.org/net/

FTPClient.rename(String from, String to);

回答by skaffman

In the name of all that's holy, don't try and write your own FTP client.

以神圣的名义,不要尝试编写自己的 FTP 客户端。

Use Apache Commons Net, it comes with an FTP client classfor you to use.

使用Apache Commons Net,它带有一个FTP 客户端类供您使用。