First, I already suggested you that you cannot combine Windows command (to run WinSCP) and WinSCP commands in one script. What obviously your script is doing. Second, you did not answer my question. What kind of script the above is? Is is a
.bat
file? If it is, make sure you move the remaining commands to a WinSCP script file and reference the file from WinSCP command-line. For that refer to the links I've posted earlier.