Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

As you can see, WinSCP returned exit code 1:
. 2019-02-20 00:07:21.687 Script: Exit code: 1

So it behaves correctly.
It must be your batch file that incorrectly processes the exit code.
But you didn't post your complete batch file, so I cannot tell why.
1DA

I've had to exclude some links but this is the base of the Winscp log that shows an error but did not send out an error email. I've turned off partial file transfers for now to help with this.

winscp Log
. 2019-02-20 00:07:20.859 File: 'Generic.txt' [2019-02-20T08:07:16.087Z] [7148863]
. 2019-02-20 00:07:20.859 Copying "Generic.txt" to remote directory started.
. 2019-02-20 00:07:20.859 Binary transfer mode selected.
. 2019-02-20 00:07:20.859 Checking existence of file.
> 2019-02-20 00:07:20.859 Type: SSH_FXP_LSTAT, Size: 63, Number: 61703
< 2019-02-20 00:07:20.906 Type: SSH_FXP_STATUS, Size: 24, Number: 22790
< 2019-02-20 00:07:20.906 Status code: 0
< 2019-02-20 00:07:20.906 Type: SSH_FXP_STATUS, Size: 24, Number: 23046
< 2019-02-20 00:07:20.906 Status code: 0
< 2019-02-20 00:07:20.906 Type: SSH_FXP_STATUS, Size: 24, Number: 23302
< 2019-02-20 00:07:20.906 Status code: 0
< 2019-02-20 00:07:20.906 Type: SSH_FXP_STATUS, Size: 24, Number: 23556
< 2019-02-20 00:07:20.906 Status code: 0
> 2019-02-20 00:07:20.906 Type: SSH_FXP_REMOVE, Size: 63, Number: 23821
< 2019-02-20 00:07:20.922 Type: SSH_FXP_ATTRS, Size: 37, Number: 61703
. 2019-02-20 00:07:20.937 File exists: Generic.txt;-;7122363;2019-02-20T08:07:20.000Z;3;"" [1001];"" [1013];rw-r--r--;0
. 2019-02-20 00:07:20.937 Checking existence of partially transferred file.
> 2019-02-20 00:07:20.937 Type: SSH_FXP_LSTAT, Size: 72, Number: 61959
< 2019-02-20 00:07:20.984 Type: SSH_FXP_STATUS, Size: 24, Number: 23821
< 2019-02-20 00:07:20.984 Status code: 0
> 2019-02-20 00:07:20.984 Type: SSH_FXP_RENAME, Size: 130, Number: 24082
< 2019-02-20 00:07:21.000 Type: SSH_FXP_STATUS, Size: 29, Number: 61959
< 2019-02-20 00:07:21.000 Status code: 2
. 2019-02-20 00:07:21.000 Opening remote file.
> 2019-02-20 00:07:21.000 Type: SSH_FXP_OPEN, Size: 88, Number: 62211
< 2019-02-20 00:07:21.047 Type: SSH_FXP_STATUS, Size: 29, Number: 24082
< 2019-02-20 00:07:21.047 Status code: 2, Message: 24082, Server: No such file, Language:
* 2019-02-20 00:07:21.062 (ETerminal) No such file or directory.
* 2019-02-20 00:07:21.062 Error code: 2
* 2019-02-20 00:07:21.062 Error message from server: No such file
. 2019-02-20 00:07:21.062 Asking user:
. 2019-02-20 00:07:21.062 Transfer was successfully finished, but temporary transfer file 'Generic.txt.filepart' could not be renamed to target file name 'Generic.txt'. If the problem persists, you may try to turn off transfer resume support. ("No such file or directory.
. 2019-02-20 00:07:21.062 Error code: 2
. 2019-02-20 00:07:21.062 Error message from server: No such file")
< 2019-02-20 00:07:21.062 Script: Transfer was successfully finished, but temporary transfer file 'Generic.txt.filepart' could not be renamed to target file name 'Generic.txt'. If the problem persists, you may try to turn off transfer resume support.
< 2019-02-20 00:07:21.062 Script: No such file or directory.
< 2019-02-20 00:07:21.062 Error code: 2
< 2019-02-20 00:07:21.062 Error message from server: No such file
* 2019-02-20 00:07:21.062 (ESkipFile) Transfer was successfully finished, but temporary transfer file 'Generic.txt.filepart' could not be renamed to target file name 'Generic.txt'. If the problem persists, you may try to turn off transfer resume support.
* 2019-02-20 00:07:21.062 No such file or directory.
* 2019-02-20 00:07:21.062 Error code: 2
* 2019-02-20 00:07:21.062 Error message from server: No such file
< 2019-02-20 00:07:21.078 Type: SSH_FXP_HANDLE, Size: 13, Number: 62211
> 2019-02-20 00:07:21.078 Type: SSH_FXP_WRITE, Size: 32764, Number: 62726
. 2019-02-20 00:07:21.078 Copying finished: Transferred: 2,609,689, Elapsed: 0:00:01, CPS: 1,874,145/s
. 2019-02-20 00:07:21.078 Script: Failed
. 2019-02-20 00:07:21.078 Script: Exit code: 1
. 2019-02-20 00:07:21.078 Closing connection.
. 2019-02-20 00:07:21.078 Sending special code: 12
. 2019-02-20 00:07:21.078 Sent EOF message
. 2019-02-20 00:07:21.531 403 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2019-02-20 00:07:21.531 Type: SSH_FXP_CLOSE, Size: 13, Number: 118788
< 2019-02-20 00:07:21.531 Type: SSH_FXP_STATUS, Size: 24, Number: 110086
< 2019-02-20 00:07:21.531 Status code: 0
< 2019-02-20 00:07:21.531 Type: SSH_FXP_STATUS, Size: 24, Number: 110342
< 2019-02-20 00:07:21.531 Status code: 0
< 2019-02-20 00:07:21.531 Type: SSH_FXP_STATUS, Size: 24, Number: 110598
< 2019-02-20 00:07:21.531 Status code: 0
< 2019-02-20 00:07:21.531 Type: SSH_FXP_STATUS, Size: 24, Number: 110854
< 2019-02-20 00:07:21.531 Status code: 0
< 2019-02-20 00:07:21.531 Type: SSH_FXP_STATUS, Size: 24, Number: 111110
< 2019-02-20 00:07:21.531 Status code: 0
< 2019-02-20 00:07:21.531 Type: SSH_FXP_STATUS, Size: 24, Number: 111366
< 2019-02-20 00:07:21.531 Status code: 0
< 2019-02-20 00:07:21.531 Type: SSH_FXP_STATUS, Size: 24, Number: 111622
< 2019-02-20 00:07:21.531 Status code: 0
< 2019-02-20 00:07:21.547 Type: SSH_FXP_STATUS, Size: 24, Number: 111878
< 2019-02-20 00:07:21.547 Status code: 0
< 2019-02-20 00:07:21.562 Type: SSH_FXP_STATUS, Size: 24, Number: 112134
< 2019-02-20 00:07:21.562 Status code: 0
< 2019-02-20 00:07:21.562 Type: SSH_FXP_STATUS, Size: 24, Number: 112390
< 2019-02-20 00:07:21.562 Status code: 0
< 2019-02-20 00:07:21.562 Type: SSH_FXP_STATUS, Size: 24, Number: 112646
< 2019-02-20 00:07:21.562 Status code: 0
< 2019-02-20 00:07:21.562 Type: SSH_FXP_STATUS, Size: 24, Number: 112902
< 2019-02-20 00:07:21.562 Status code: 0
< 2019-02-20 00:07:21.562 Type: SSH_FXP_STATUS, Size: 24, Number: 113158
< 2019-02-20 00:07:21.562 Status code: 0
< 2019-02-20 00:07:21.562 Type: SSH_FXP_STATUS, Size: 24, Number: 113414
< 2019-02-20 00:07:21.562 Status code: 0
< 2019-02-20 00:07:21.562 Type: SSH_FXP_STATUS, Size: 24, Number: 113670
< 2019-02-20 00:07:21.562 Status code: 0
< 2019-02-20 00:07:21.578 Type: SSH_FXP_STATUS, Size: 24, Number: 113926
< 2019-02-20 00:07:21.578 Status code: 0
< 2019-02-20 00:07:21.578 Type: SSH_FXP_STATUS, Size: 24, Number: 114182
< 2019-02-20 00:07:21.578 Status code: 0
< 2019-02-20 00:07:21.578 Type: SSH_FXP_STATUS, Size: 24, Number: 114438
< 2019-02-20 00:07:21.578 Status code: 0
< 2019-02-20 00:07:21.578 Type: SSH_FXP_STATUS, Size: 24, Number: 114694
< 2019-02-20 00:07:21.578 Status code: 0
< 2019-02-20 00:07:21.578 Type: SSH_FXP_STATUS, Size: 24, Number: 114950
< 2019-02-20 00:07:21.578 Status code: 0
< 2019-02-20 00:07:21.578 Type: SSH_FXP_STATUS, Size: 24, Number: 115206
< 2019-02-20 00:07:21.578 Status code: 0
< 2019-02-20 00:07:21.578 Type: SSH_FXP_STATUS, Size: 24, Number: 115462
< 2019-02-20 00:07:21.578 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 115718
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 115974
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 116230