使用 FTP 如何重命名带有尾随空格的目录?

发布于 2024-08-02 17:42:32 字数 462 浏览 1 评论 0原文

我的网站上有一个目录,有两个尾随空格(自动创建),现在我需要将其重命名为相同的名称,不带空格。

例如: ren "BON N ALL " "BON N ALL"

但我不断得到;
FTP>任“BON N ALL”“BON N ALL”
550 BON N ALL:系统找不到指定的文件。

我尝试过使用通配符,例如;

ftp>任“BON N ALL?” “万事如意”
550 BON N ALL??:文件名、目录名或卷标语法不正确。

ftp>任“BON N ALL”“BON N ALL”
550 BON N ALL:系统找不到指定的文件。

ftp>任“BON N ALL*”“BON N ALL”
550 BON N ALL*:文件名、目录名或卷标语法不正确。

这是在带有 IIS 的 Windows 系统上。任何帮助将不胜感激。

I have a directory on my website the has two trailing spaces (automatically created) and now I need to rename it to the same name with out the spaces.

For example: ren "BON N ALL " "BON N ALL"

But I keep getting;

ftp> ren "BON N ALL " "BON N ALL"

550 BON N ALL : The system cannot find the file specified.

I've tried using wildcards like;

ftp> ren "BON N ALL??" "BON N ALL"

550 BON N ALL??: The filename, directory name, or volume label syntax is incorrect.

ftp> ren "BON N ALL" "BON N ALL"

550 BON N ALL: The system cannot find the file specified.

ftp> ren "BON N ALL*" "BON N ALL"

550 BON N ALL*: The filename, directory name, or volume label syntax is incorrect.

This is on a windows system with IIS. Any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瑕疵 2024-08-09 17:42:32

我遇到了类似的问题,并在前面使用 ./ 和在结尾名称上使用 / 解决了问题,

例如:

RNFR ./ directory name with spaces  /
RNTO ./new_directory_name

I had a similar problem, and solved the problem using ./ on front and / on end name

for example:

RNFR ./ directory name with spaces  /
RNTO ./new_directory_name
赠我空喜 2024-08-09 17:42:32

我尝试使用 Windows XP 附带的 ftp 客户端执行此操作,得到了相同的结果,但是,使用 filezilla 客户端重命名它没有问题。 Filezilla 客户端使用 RNFRRNTO 重命名文件成功,但 windows 命令line ftp 客户端没有此命令。我建议你更换你的ftp客户端。

祝你好运。

I try to do it with the ftp client included with windows XP with the same results, however, with the filezilla client I had no problem to rename it. Filezilla client use the RNFR and RNTO to rename the files successfully, but the windows comand line ftp client do not have this commands. I recomend you to change your ftp client.

Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文