Timestamps not preserved when synchronizing via script

Advertisement

TommyB
Joined:
Posts:
2

Timestamps not preserved when synchronizing via script

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:

  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

Reply with quote

Advertisement

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

Re: Timestamps not preserved when synchronizing via script

What options have you checked on the synhronization dialog? Does it work if you use synchronize command in GUI?
_________________
Martin Prikryl

Reply with quote

TommyB
Joined:
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 :-)

regards
Thomas

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,097
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

Reply with quote

Advertisement

You can post new topics in this forum