Topic "Batch won't exit"

Author Message
fcleyet
[View user's profile]

Joined: 2017-07-12
Posts: 1
Location: Switzerland
Hello,

I have a batch that doesn't exit and reconnect indefinitely.

The Batch:
option reconnecttime 1
option batch abort
option confirm off
OPEN ftp://xxxx:yyyy@ftp.wwww.com -passive
LCD "D:\"
PUT "xxxxx.zip"
CLOSE
exit

The Result:
In the attached image.

Why doesn't the script auto abort? I am using option batch abort. Am I missing something ?

Thanks in advance for your help.
winscp.gif (26.44 KB)

Description: (none)

winscp.gif

Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
See https://winscp.net/eng/docs/scriptcommand_option#reconnecttime
Mark123746373

Guest


Hi, i got the same problem.
The option command is not working.

Quote:
Connecting to ftp.XXXXXXX.com ...
TLS connection established. Waiting for welcome message...
Connected
Starting the session...
Session started.
Active session: [1] XXXXXXXXX@ftp.XXXXXXXX.com
batch abort
reconnecttime 120
FILE | 0 B | 0,0 KB/s | binary | 0%
Lost connection.
Timeout detected. (control connection)
Copying files to remote side failed.
(A)bort, (R)econnect (0 s): Reconnect <<<<=== WHY???
Connecting to ftp.XXXXXXXX.com ...


Tracker Bug 1169 only solved "Do not indefinitely retry transfer with FTP protocol when opening transfer channel is failing" problem.
If the problem is NOT while opening but after (e.g. Lost connection), there still is infinite retry.
https://winscp.net/tracker/show_bug.cgi?id=1169

Kind regards, Mark
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Mark123746373

Guest


Hi,
just for your information:

I want to save backup files into the cloud.
If this fails, e.g. because cloud space is full, I want to receive an email.
Therefore i wrote a batchfile, but because of the permanent reconnect of WinSCP the batch never came to the point of sending the email.

For testing I limited cloudspace to 50MB and tried to copy a 100MB file.

When the upload is around 50MB, the transfer speed is decreasing, then increasing again, decreasing and so on, and then WINSCP loses Connection and reconnects.
Then some more KB can be copied with low speed, until next 'Lost Connection'. This continues for quite a while.

BUT: After many reconnects, the Server sent "Quota exceeded" which finally got WinSCP to abort.

So everything seems to be fine.
I will give you an update after more testing, and post a log if the infinite reconnect occurs again.

greetings
Mark
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
Mark123746373 wrote:
I want to save backup files into the cloud.
If this fails, e.g. because cloud space is full, I want to receive an email.
Therefore i wrote a batchfile, but because of the permanent reconnect of WinSCP the batch never came to the point of sending the email.


Check option reconnecttime:
https://winscp.net/eng/docs/scriptcommand_option#reconnecttime

Though, if you use the latest version of WinSCP in a standard way, it should default to 120 seconds anyway.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License