1) make_batch_body.bat
@echo off
echo open some:MyPASS@%1 >> temp.batch
echo cd /var/log/ >> temp.batch
echo get messages %2_messages >> temp.batch
echo close >> temp.batch
2) do_batch.bat
@echo off
rm temp.batch
echo option batch on > temp.batch
echo option confirm off >> temp.batch
call make_batch_body.bat 192.168.0.11 server1
call make_batch_body.bat 192.168.0.12 server2
call make_batch_body.bat 192.168.0.13 server3
echo exit >> temp.batch
cd My_OutLog
"C:\Program Files\WinSCP\WinSCP.exe" /console /log=../Log/winscplog.txt /script=../temp.batch