Re: Passing variables to the scripts
It is not bad idea, however WinSCP currently does not allow it.
But you can easily implement this using .bat file:
But you can easily implement this using .bat file:
@echo off
rem Do we have some parameters at all?
if "x%1" == "x" goto syntax
rem Delete the old script, if exists
if exist script.txt del script.txt
:next
rem Append "put" command for the file
echo put %1 >> script.txt
rem Delete the first parameter and shift remaning by one to left
shift
rem Are we at the end of parameter list already?
if not "x%1" == "x" goto next
winscp3 abc@example.com /script=script.txt
goto quit
:syntax
echo upload.bat file1 [file2 ...]
:quit