Topic "Timestamps not preserved when synchronizing via script"

Author Message
TommyB
[View user's profile]

Joined: 2007-05-02
Posts: 2
Hi,

I already searched the forum and checked the documentation back and forth, but could not find a clue how to solve the problem following below...

I'm using the following script to sync a remote server directory containing backups to a local server:

Code:
  option batch on
  option confirm off
  option synchdelete off
  open MyStoredSession
  synchronize local \\local\data\Backup\ /remote/Backup/
  exit


The problem is that the local files always have the current timestamp (= the time when the download occurs, every day around 06:00am) instead of the actual remote timestamp.

I found this out the hard way because I first used the "synchronize both" command and WinSCP3 kept copying the files up and down multiple times (because of the updated timestamps)...

The timestamp of the downloaded file is OK if the download is made the "manual" way (through the WinSCP GUI)

"Preserve timestamps" in the preferences is checked.

Using Version 3.8.1 (Build 328), tested on a Windows XP and Windows 2000 machine.

Any ideas what could be causing this?

regards
thomas
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
What options have you checked on the synhronization dialog? Does it work if you use synchronize command in GUI?
_________________
Martin Prikryl
TommyB
[View user's profile]

Joined: 2007-05-02
Posts: 2
Hi Martin,

I'm not sure what you mean with "checked options", as the problem is only with
the scripted synchronisation - or do the settings in the GUI synchronize-dialog
have any influence on the scripted sync?

It works as expected from the GUI when using the synchronize function (Ctrl-S),
the timestamps are correct then.

BTW, many thanks for this great tool - I will make a donation for sure Smile

regards
Thomas
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
I have no idea how it is possible that it works from GUI, when it does not work from script. Please post a log file showing synchronization of single file.
_________________
Martin Prikryl
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