Topic "Too fast update with keepuptodate"

Author Message
CraigT

Guest


Hi!

First of all I would like to thank the author, winscp is just awesome!

I'm running version 3.8.1 and is using the keepuptodate feature from a script to upload files from a directory that is updated every minute. It however jams a couple of times a week.

I run it from sync.bat:
Code:
@echo off
: START
"C:\Program Files\WinSCP3\WinSCP3.com" /script=uploaderscript.txt
GOTO START


using uploaderscript.txt:
Code:
# 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

# Connect
open user@domain.tld

# Force binary mode transfer
option transfer binary

# Keep remote directory updated
keepuptodate D:\Sync\Datafiles /home/user/data

# Disconnect
close

# Exit WinSCP
exit


which outputs:
Code:
batch        on
confirm      off
Initialisation...
Searching for host...
Connecting to host...
Authenticating...
Using username "user".
Authenticating with public key "userkey" from agent.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] user@domain.tld
transfer     binary
Watching for changes, press Ctrl-C to abort...
Scanning 'D:\Sync\Datafiles' for subdirectories...
Watching for changes in 1 directories...
Change in 'D:\Sync\Datafiles' detected.
Local 'D:\Sync\Datafiles' => Remote '/home/user/data'
D:\...\file1.bin   |          0 kB |    0,3 kB/s | binary | 100%
D:\...\file2.bin   |          0 kB |    0,3 kB/s | binary | 100%
Change in 'D:\Sync\Datafiles' detected.
Change in 'D:\Sync\Datafiles' detected.
Local 'D:\Sync\Datafiles' => Remote '/home/user/data'
D:\...\file1.bin   |          0 kB |    0,3 kB/s | binary | 100%
D:\...\file2.bin   |          0 kB |    0,3 kB/s | binary | 100%
Change in 'D:\Sync\Datafiles' detected.


but then at some point it jams and is not restarted by the goto-loop until I change the window focus to another application! This is the last output before it hangs:
Code:
Change in 'D:\Sync\Datafiles' detected.
Local 'D:\Sync\Datafiles' => Remote '/home/user/data'
D:\...\file1.bin   |          0 kB |    0,0 kB/s | binary |   0%
Can't open file 'D:\Sync\Datafiles\file1.bin'.
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort

Retry or possible skip would be the appropriate action here...

I think the problem is that it's too fast, it would need to wait a fiew seconds after a change is detected and then do the upload. The changing of the delay seems to be undocumented but existing? According to the History for 3.8 beta:
Quote:
Synchronization enhanced: Synchronization delay for function Keep Remote Directory Up To Date is configurable (only directly in configuration files).
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
CraigT wrote:
but then at some point it jams and is not restarted by the goto-loop until I change the window focus to another application!

Have any idea why?

Quote:
I think the problem is that it's too fast, it would need to wait a fiew seconds after a change is detected and then do the upload. The changing of the delay seems to be undocumented but existing? According to the History for 3.8 beta:
Quote:
Synchronization enhanced: Synchronization delay for function Keep Remote Directory Up To Date is configurable (only directly in configuration files).


You can change the delay in registry:
Code:
REGEDIT4

[HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Configuration\Interface]
"KeepUpToDateChangeDelay"=dword:000001f4

_________________
Martin Prikryl
Guest




prikryl wrote:
CraigT wrote:
but then at some point it jams and is not restarted by the goto-loop until I change the window focus to another application!

Have any idea why?

I renamed my .bat to .cmd and it has not jammed since then. (Running for more than 6 weeks!)
Advertisements

You can post new topics in this forum






Search Site

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