Topic "Too many parameters for command 'open'."

Author Message
Jochem

Guest


Hi,

I'm trying to upload a file to a sftp server using the following command:

Quote:
D:\DefactoLMS\WinSCP.com /script=D:\DefactoLMS\commands.dat


The content of the commands.dat file:

Quote:
open sftp://username@domain.com –privatekey="D:\Send\privat_key.ppk" -passphrase="[mypassphrase]"

option batch abort
option confirm off
put D:\Send\test.txt

exit


I'm using winscp575. If I google the error the only thing I find is that i should use a newer version; but as far as i know this one is the most recent atm.

Please help; thanks already!

Jochem
Advertisements
Jochem

Guest


In addition..

If i run the commands directly into cmd; it works like a charm! Surprised
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
The dash before privatekey is not a plain "hyphen-minus" sign as it should be, but an "en dash" character:
http://www.fileformat.info/info/unicode/char/2013/index.htm
Jochem

Guest


Wauw! How did you find that?!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Just take a look at your first post. The dash before privatekey is a way longer than the dash before passphrase.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License