I've been wrestling with WinSCP command exe with script for the past day or so.. I'm automating software install and other admin/provisioning on a local VM. We will be using the scripting to make the VM build repeatable for a small dev team.
My exe command is being called in a shell script & currently looks like this:
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script="C:\VMBuild\initscript.txt" /log=C:\VMBuild\log.txt /loglevel=*
opencommand in the script like this:
initscript.txtso I can use the argument in the
opencmd. That way
initscriptdoes not have to change when passed around the team that are working on diff machine IPs. Something like this
Gather the IP details as a variable in the shell $vmip
apply this to the execution command:
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script="C:\VMBuild\scriptTEST.txt" /log=C:\VMBuild\log.txt /loglevel=* /parameter $vmip
Scripting does not use standalone parameters. The parameters you have specified on command-line will not be used. Your command-line syntax is probably wrong. Opening session using command-line parameter in scripting is deprecated. Use 'open' command instead. Searching for host... Host "C" does not exist.
Can you give me a nudge and let me know what I'm doing wrong please?