Batch won't exit

Advertisement

fcleyet
Joined:
Posts:
1
Location:
Switzerland

Batch won't exit

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

Reply with quote

Advertisement

Mark123746373
Guest

Same here

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

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/1169

Kind regards, Mark

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,658
Location:
Prague, Czechia

Re: Same here

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.

Reply with quote

Mark123746373
Guest

Re: Same here

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,658
Location:
Prague, Czechia

Re: Same here

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.

Reply with quote

Advertisement

You can post new topics in this forum