Parametrized script help
Hello,
I am trying to make a parametrized scrip to upload jpg files, but I got stuck.
I have servers.bat :
@echo off
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server1.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server2.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server3.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server4.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server5.com/
And I have script.txt :
open %1%
put \\Files\Upload\*.jpg /
exit
Since the server5.com should have a different path to remote location (put \\Files\Upload\*.jpg /Folder), here the problem starts.
I tried to do with additional parameters, but I could not do anything.
Please help.
Thank you in advance.
Victor
I am trying to make a parametrized scrip to upload jpg files, but I got stuck.
I have servers.bat :
@echo off
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server1.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server2.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server3.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server4.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server5.com/
And I have script.txt :
open %1%
put \\Files\Upload\*.jpg /
exit
Since the server5.com should have a different path to remote location (put \\Files\Upload\*.jpg /Folder), here the problem starts.
I tried to do with additional parameters, but I could not do anything.
Please help.
Thank you in advance.
Victor