Topic "Automate Sync based on remote file timestamp."

Author Message
joebhoy
[View user's profile]

Joined: 2011-11-24
Posts: 5
Location: Glasgow
Hi All,
Looking for some help on this. I have remote server I connect to where I download zip files. Each zip file has a corresponding *.ctl filename.
eg. Bigfile.zip bigfile.ctl
On the local machine, once the zip files are downloaded they are uncompressed and then removed. the *.ctl files remain
I need to be able to compare timestamp on bigfile.ctl on the local and remote machine. and if theres a difference then download bigfile.zip. thats the intention anyway.
I've no idea as scripting so appreciate any help on this.

cheers
Joe.
joebhoy
[View user's profile]

Joined: 2011-11-24
Posts: 5
Location: Glasgow
I've been thinking.

Maybe I could check the timestamp on the file. If its less than 1 day old I could download it. If this script runs evey 24 hours then it should only do this once.
Is that possible ?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
It's not really easy task, but this example may give you some hint:
https://winscp.net/eng/docs/script_download_most_recent_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