This is not a script, it's a sequence of inputs.
You have to store the WinSCP commands to a script file and tell WinSCP to execute it using
Thanks for your reply. Earlier also,the commands were saved to script file only and it worked. The only difference was WinSCP was executed in the same script file.
Now, we have separated the script and have used batch file that executes WinSCP.
Thanks for the solution. :)