You can tell the result of script by WinSCP exit code. Code 0 indicates success, while 1 indicates an error. For more details refer to scripting documentation.
To find out why the script failed, inspect session log.
For an example see:
- Guide to transfer automation;
- Retrying script/connection attempt example;
- Emailing script results example.