Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

mattduguid

How does one make a script default to "(R)etry"

When prompted with the following,

(A)bort, (R)etry, (S)kip, Ski(p) all
martin

Re: Automatic Retry in Script

I suppose that you open the session via command line parameter, so before the "option batch on" takes effect. Use command "open" instead and place it after the "option batch on".
deker

Automatic Retry in Script

I am using a combination of a saved session and a script to upload a file.

Here's my script:

# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
lcd c:\winnt
# Upload the file to current working directory
put test.txt
# Disconnect
close
# Exit WinSCP
exit


Now, when I connect to the server, it's always slow, so it asks me: "Wait for another 15 seconds?"

Once I hit "R" to retry, it connects successfully. How can I incorporate this into my script, so I don't always have to be the one pressing "R"?

Thanks for your help!