WinSCP3.com /command (etc...)

Advertisement

DaveOK
Guest

WinSCP3.com /command (etc...)

Hi,

I managed to get this script file working:

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:
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:
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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,246
Location:
Prague, Czechia

Re: WinSCP3.com /command (etc...)

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

Reply with quote

Advertisement

You can post new topics in this forum