使用 webrequest 发出移动 FTP 文件夹的重命名命令
我试图使用 webrequest 对象移动文件夹,例如
move data/current
到 data/previous/1/
但是,当我尝试简单地通过将源文件夹设置为源、目标文件夹设置为目标来做到这一点时,我遇到了异常
请求 URI 对于此 FTP 命令无效。
我根本不应该这样做吗?我该如何巧妙地实现这个目标?
How can I use FTP to move files between directories?
I were trying to use the webrequest object to move a folder, say
move data/current
to data/previous/1/
however when i try to do it simply by setting source folder as source, target folder as destination, i have got the exception
The request URI is invalid for this FTP command.
should i not be doing that at all? how should i achieve this objective neatly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现当请求 URI 带有尾部斜杠(即使它是一个目录)时,我会收到此错误。尝试删除
data/previous/1/
上的最后一个斜杠。I have found that I get this error when the request URI has a trailing slash (even if it is a directory). Try removing the last slash on
data/previous/1/
.