Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: Too many parameters for command 'open'

That's done it! Damn, thought I could put the hostkey in a file.
Thanks for your help

Re: Too many parameters for command 'open'

If you need to use double quotes around switch value, you have to double them. See

Also, the value of -hostkey is a fingerprint not a path to a file. /command "open s -hostkey=""ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx..."" -privatekey=""C:\bla\sqlbackup\SFTP.ppk""" "rm TEST.TXT" "put C:\bla\sqlbackup\TEST.TXT" exit

The easiest is to configure the session in WinSCP GUI and have it generate the command-line for you:

Too many parameters for command 'open'

Good Afternoon,

Can anyone offer advice on the below? Spent days and can't figure it out.

Everything seemed to work before I specified the hostkey, now I can successfully run the connection part of the script, but not rm onwards. /command "open s -hostkey="C:\bla\sqlbackup\HOST.ppk" -privatekey="C:\bla\sqlbackup\SFTP.ppk" "rm TEST.TXT" "put C:\bla\sqlbackup\TEST.TXT" exit