本文介绍了命令行:" - "转换为" U"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行一个.bat或.cmd文件这个命令来启动一个FTP脚本:

I'm running this command in a .bat or .cmd file to launch an ftp script:

ftp –v –i –s:test_script.txt

命令窗口将其转换为这样的:

Command window converts it to this:

ftp ûv ûi ûs:test_script.txt

因此​​它不能正常工作。

And thus it does not work.

请注意:如果我手动从cmd窗口中运行上面的命令,它工作正常。只有当我启动它作为一个.bat或.cmd文件失败。

Note: if I manually run the above command from a cmd window, it works fine. Only fails when I launch it as a .bat or .cmd file.

需要帮助preventing转换。谢谢你。

Need help preventing the conversion. Thanks.

推荐答案

您在您所提供的命令有破折号是ASCII 150,但是在切换到命令中使用的短划线是ASCII 45.我猜你有副本从Word文档或电子邮件,其中主编的有益改变了破折号长划线/粘贴此命令。

The dashes you have in the command you've provided are ASCII 150, but the dashes used in switches to commands are ASCII 45. I would guess you have copy/pasted this command from a Word doc or email where the editor "helpfully" changed the dashes to em-dashes.

如果你从这个问题的复制/粘贴您的命令到一个cmd窗口,它将无法正常,因为错误的短线运行。你在命令行中重新键入它,也许,而不是复制/粘贴?

If you copy/paste your command from this question into a cmd window, it won't run properly because of the wrong dashes. Are you retyping it at the command line, perhaps, rather than copy/pasting?

无论如何,解决办法是重新键入破折号在批处理文件中。

Regardless, the solution is to retype the dashes in your batch file.

这篇关于命令行:" - "转换为" U"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 10:39