Use the /script command line option to pass the script to the WinSCP executable. Generally, you should also use /ini=nul switch to isolate the script execution from GUI configuration and /log= switch to enable session logging. You can embed the complete command line into a Windows batch file (.bat), like as follows: