WinSCP命令行-使用-rawtransfersettings开关时,命令“ open”的参数过多 [英] WinSCP command line - Too many parameters for command 'open' when using -rawtransfersettings switch
问题描述
我收到命令'open'的参数过多。尝试使用以下命令连接到服务器时出错,
I am getting "Too many parameters for command 'open'." error when trying to connect to a server for below command,
option confirm off
open sftp://uname:pwd@abc.example.com/ -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx" -timeout=60 -rawsettings SendBuf=0 SshSimple=1 -rawtransfersettings IgnorePermErrors=0 PreserveTimeDirs=0
我检查了很多其他文章,提到使用双引号来表示有空格的文本,我想我上面的脚本是对此抱怨。
如果删除最后一组参数,然后删除 -rawtransfersettings
,则脚本可以正常工作。那就是 open sftp:// uname:pwd@abc.example.com/ -hostkey = ssh-rsa 1024 xx:xx:xx:xx:xx:xx -timeout = 60 -rawsettings SendBuf = 0 SshSimple = 1
命令运行完美。
I have checked lot of other posts mentioning the use of Double-Quotes for text having space and I think my above script is complaint with that.
If I remove the last set of parameters followed by -rawtransfersettings
my script work fine. That is the open sftp://uname:pwd@abc.example.com/ -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx" -timeout=60 -rawsettings SendBuf=0 SshSimple=1
commands works perfectly.
我不确定如何进一步执行此操作,因为我是命令脚本世界的新手。
I am not sure how to proceed further with this as I am new to command scripting world.
推荐答案
WinSCP open
命令没有 -rawtransfersettings
开关。
WinSCP open
command has no -rawtransfersettings
switch.
该开关属于文件传输命令,例如 get
, put
等。
That switch belongs to file transfer commands, like get
, put
, etc.
其他具有相同错误消息,但问题不同的问题:
- WinSCP "Too many parameters for command 'open'." error
- Getting "Too many parameters for command", when calling WinSCP command-line from VBA
- FTP "Too many parameters for command 'synchronize'" with WinSCP
这篇关于WinSCP命令行-使用-rawtransfersettings开关时,命令“ open”的参数过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!