Topic "Syncronise automation doesn't update files"

Author Message
guest_Benoit

Guest


Hi there,
I'm trying to syncronise a folder in my FTP server with a local folder.
So, I use scripting method.
Code:
@echo off
WinSCP.exe /console /script=script_syncro.txt

There my script :
Code:
open sftp://benoit:****@***.***.***.***
synchronize local -mirror -delete "C:\Users\Benoit\Cloud" "/home/cloud"
keepuptodate "C:\Users\Benoit\Cloud" "/home/cloud"
exit

As you can see, I start an update of my local folder from the server and then, I keep up to date the server with the local folder.
It seems perfect to me, but when I start the script : ok, It check all differences :

Then, It say :

But, I have :


And, If I modify the local folder like that, It doesn't work more (I update FTP client before taking screenshot) :


At least, It detect that I modify the folder... but doesn't upload.

Thanks in advance Smile
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.

_________________
Martin Prikryl
BCrisvay
[View user's profile]

Joined: 2013-12-17
Posts: 4
Location: France
I created my own account. The file is compressed in the attachment.
And... you can delete this topic : https://winscp.net/forum/viewtopic.php?p=48284#48284
When I post this one, it proposed to me to consider to repost the topic without external link and by using attachment.
syncronize_logs.zip (409.26 KB) [Download]

Description: The log file compressed.

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Thanks. But I need a log file for a session, when a change happens. I do not see any Change in ... detected record in the log.
_________________
Martin Prikryl
BCrisvay
[View user's profile]

Joined: 2013-12-17
Posts: 4
Location: France
Ok, I do it again.

Ok, first :
I add a file called "test_file_from_remote.txt" in the remote "/home/benoit/cloud/test/".
I start my script :

Line 36 803 :
Code:
< 2013-12-19 19:10:04.971 Script: Synchronizing...
. 2013-12-19 19:10:04.972 Synchronizing local directory 'C:\Users\Benoit\Cloud\test\' with remote directory '/home/cloud/test/', params = 0x1007 (Delete, NoConfirmation, ExistingOnly, Mirror)
> 2013-12-19 19:10:04.972 Script: keepuptodate -delete -transfer=automatic -filemask=|films/;__pycache__/ "C:\Users\Benoit\Cloud" "/home/cloud"

It display "Script: Synchronizing...", but I have a file in the remote directory and it's not downloaded here...

I add a file in the directory "C:\Users\Benoit\Cloud\" :
36 809 :
Quote:
< 2013-12-19 19:15:38.085 Script: Change in 'C:\Users\Benoit\Cloud' detected.

36 844 :
Code:
< 2013-12-19 19:15:38.610 Script: Change in 'C:\Users\Benoit\Cloud\test' detected.


36 848 :
Code:
. 2013-12-19 19:15:38.610 Local file 'C:\Users\Benoit\Cloud\test\test_file_from_local.txt' [2013-12-19T18:03:37.654Z] [0] included to synchronization


Then, it find the new file I have uploaded before in the remote :
36 863 :
Code:
. 2013-12-19 19:15:38.624 Remote file '/home/cloud/test/test_file_from_remote.txt' [2013-12-19T18:09:22.000Z] [13] is new

And delete it ...
36 866 :
Code:
. 2013-12-19 19:15:38.624 Deleting file "/home/cloud/test/test_file_from_remote.txt".


Finally, none of these files are transfered.

You can donwload the full logs in attachment and looking around lines 36 8xx for all informations.

Thanks.
syncronize_logs.zip (373.58 KB) [Download]

Description: (none)

BCrisvay
[View user's profile]

Joined: 2013-12-17
Posts: 4
Location: France
With the last version (550) of WinSCP, my problem is solved. Thanks !
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
The reason is that you have Existing files only option enabled (in GUI):

Quote:
. 2013-12-19 19:15:38.624 Synchronizing local directory 'C:\Users\Benoit\Cloud\test\' with remote directory '/home/cloud/test/', params = 0xBF (Delete, NoConfirmation, ExistingOnly, NoRecurse, UseCache, DelayProgress, SubDirs)


I suppose that you run 5.5 with different configuration (INI file).

The best is if you isolate your script run from GUI configuration. See:
https://winscp.net/eng/docs/scripting#configuration
BCrisvay
[View user's profile]

Joined: 2013-12-17
Posts: 4
Location: France
Indeed, it was the problem !
Thanks you, I will modify my scripts. Smile
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