Retry download if there is an error

Advertisement

am
Joined:
Posts:
1

Retry download if there is an error

I am unable to find out how to have WinSCP retry to download the file if the file was not found. The error itself is strange because the file is always present but updated by overwriting the file from the source. The error is not consistent. It can happen once a week or once a month.

Is there a way to have WinSCP retry the download rather than exiting?

Below is the script code as well as the log output from the error.

option batch on
option confirm off
open sftp://ftp.aws.ca.com
get /exports/diagnostic.csv \\diag.effers.net\Downloads\diag_download.csv
exit

. 2018-06-21 16:31:40.327 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2018-06-21 16:31:40.327 Getting current directory name.
. 2018-06-21 16:31:40.327 Getting real path for '.'
> 2018-06-21 16:31:40.327 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2018-06-21 16:31:40.405 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2018-06-21 16:31:40.405 Real path is '/'
. 2018-06-21 16:31:40.405 Startup conversation with host finished.
< 2018-06-21 16:31:40.405 Script: Active session: [1] user@ftp.aws.ca.com
> 2018-06-21 16:31:40.405 Script: get /exports/diagnostic.csv \\diag.effers.net\Downloads\diag_download.csv 
. 2018-06-21 16:31:40.405 Listing file "/exports/diagnostic.csv".
> 2018-06-21 16:31:40.405 Type: SSH_FXP_LSTAT, Size: 81, Number: 263
< 2018-06-21 16:31:40.484 Type: SSH_FXP_STATUS, Size: 29, Number: 263
< 2018-06-21 16:31:40.484 Status code: 2, Message: 263, Server: No such file, Language:  
< 2018-06-21 16:31:40.484 Script: Can't get attributes of file '/exports/diagnostic.csv'.
< 2018-06-21 16:31:40.484 Script: No such file or directory.
< 2018-06-21 16:31:40.484 Error code: 2
< 2018-06-21 16:31:40.484 Error message from server: No such file
. 2018-06-21 16:31:40.484 Script: Failed
> 2018-06-21 16:31:40.484 Script: exit
. 2018-06-21 16:31:40.484 Script: Exit code: 1
. 2018-06-21 16:31:40.484 Closing connection.
. 2018-06-21 16:31:40.484 Sending special code: 12
. 2018-06-21 16:31:40.484 Sent EOF message
[/code]

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum