Is it possible to pass a parameter to a Bat file and then from the Bat file to a WinSCP DOS Script to specify the destination file name within the
For example -
My Bat file contains the following command -
Winscp.com /ini=nul /script=Mycripts\FTPS-to-site.txt /XMLlog=%5.xml /loglevel=1 /parameter %1 %2 %3 %4 %6
One of the lines in my WinSCP script "FTPS-to-Site.txt" is -
put -preservetime "%3%"\"%4%" %6%
%3%is the source path and
%4%the file name.
%6%should be the new file name value.
I have tried different variations like
%%6%which all result in the destination file being named
%6etc... It seems WinSCP is taking any text entered after the
"%4%"literally and not as a parameter.
Any suggestions please?