Solved
You are absolutely correct. Problem solved!
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
start
to run WinSCP? It's no used in any example on this site. Remove it.
start
launches WinSCP asynchronously not waiting for its exit. So when testing exit code, you are actually testing exit code of the previous command, the echo
, that is always 0.