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
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 116486
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 116742
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 116998
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 117254
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 117510
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 117766
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 118022
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 118278
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 118534
< 2019-02-20 00:07:21.594 Status code: 0
< 2019-02-20 00:07:21.594 Type: SSH_FXP_STATUS, Size: 24, Number: 118788
< 2019-02-20 00:07:21.594 Status code: 0
> 2019-02-20 00:07:21.594 Type: SSH_FXP_REMOVE, Size: 63, Number: 119053
< 2019-02-20 00:07:21.672 Type: SSH_FXP_STATUS, Size: 29, Number: 119053
< 2019-02-20 00:07:21.672 Status code: 2, Message: 119053, Server: No such file, Language:
* 2019-02-20 00:07:21.672 (ETerminal) No such file or directory.
* 2019-02-20 00:07:21.672 Error code: 2
* 2019-02-20 00:07:21.672 Error message from server: No such file
. 2019-02-20 00:07:21.672 Asking user:
. 2019-02-20 00:07:21.672 Error deleting file 'Generic.txt'. After resumable file upload the existing destination file must be deleted. If you do not have permissions to delete file destination file, you need to disable resumable file transfers. ("No such file or directory.
. 2019-02-20 00:07:21.672 Error code: 2
. 2019-02-20 00:07:21.672 Error message from server: No such file")
< 2019-02-20 00:07:21.672 Script: Error deleting file 'Generic.txt'. After resumable file upload the existing destination file must be deleted. If you do not have permissions to delete file destination file, you need to disable resumable file transfers.
< 2019-02-20 00:07:21.672 Script: No such file or directory.
< 2019-02-20 00:07:21.672 Error code: 2
< 2019-02-20 00:07:21.672 Error message from server: No such file
* 2019-02-20 00:07:21.672 (ESkipFile) Error deleting file 'Generic.txt'. After resumable file upload the existing destination file must be deleted. If you do not have permissions to delete file destination file, you need to disable resumable file transfers.
* 2019-02-20 00:07:21.687 No such file or directory.
* 2019-02-20 00:07:21.687 Error code: 2
* 2019-02-20 00:07:21.687 Error message from server: No such file
. 2019-02-20 00:07:21.687 Copying finished: Transferred: 7,193,149, Elapsed: 0:00:01, CPS: 7,389,484/s
. 2019-02-20 00:07:21.687 Script: Failed
. 2019-02-20 00:07:21.687 Script: Exit code: 1
. 2019-02-20 00:07:21.687 Closing connection.
. 2019-02-20 00:07:21.687 Sending special code: 12
. 2019-02-20 00:07:21.687 Sent EOF message
This is the script we are using to upload, minus the server information.
" "lcd \\1.1.1.1\generic\generic\FILES" ^
"cd /home/generic/generic/generic/" ^
"put ""*.txt""" ^
"put -delete "*.txt"" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
\\generic\generic\FILES\WinSCP\sendmail.exe -t < \\generic\generic\FILES\WinSCP\Fail.txt
)
exit /b %WINSCP_RESULT%