Topic "WinSCP3.com /command (etc...)"

Author Message
DaveOK

Guest


Hi,

I managed to get this script file working:

Code:

option batch on
option confirm off
open <username>:<password>@<domain>
cd /home/public_html/imode/
option transfer binary
put example.txt
close
exit


I'd like to do the exact same thing, except using the winscp.com /command format. When I try this:
Code:
winscp3.com /command 'option batch on' 'option confirm off' 'open <username>:<password>@<domain>' 'cd /home/public_html/imode/' 'option transfer binary' 'put example.txt' close exit


it prompts me for a username.

When I try this:
Code:
winscp3.com <username>:<password>@<domain> /command 'option batch on' 'option confirm off' 'cd /home/public_html/imode/' 'option transfer binary' 'put example.txt' close exit


it connects to the server ok, but doesn't execute any of my specified commands.

Can anyone help?

I'd rather not use a script file as these commands will be included in a make system, and I'd rather not have to write a script to write an scp script...

Thanks - Dave.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
What version of WinSCP are you using? Parameter /command is supported since 3.7.5 only. Also you need to use double-quotes around a command. Windows does not allow single-quotes.
_________________
Martin Prikryl
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