Topic "Automating Synchronization"

Author Message
peg110
[View user's profile]

Joined: 2010-01-28
Posts: 3
Location: Pennsylvania
Ok, First I am new to WinSCP but I am not new to Scripting or FTP/SFTP.

I have been reading on the synchronization options in WinSCP and so far I like what I see, however, I have additional criteria in my Synchronization routine.

First I have my local drive which I want to keep updated with the data from my remote host. No problem thus far. The problem lies in the storage space I have available locally. I need to keep it carefully monitored. To that end I need to keep only about 3 days worth of data in the folder.

Remotely, I have upwards of 10 days worth of data (or more) and need to keep that there. My problem is Synching the data, will bring ALL the older data that has been removed locally (or more correctly archived as opposed to removed) during the Sync process. All the files have embeded in the file names a formatted date. (i.e. the file could be named MyData-2010-02-16-2200-2300-09355787.gz). Is there a way to automate the getting/synchronizing of files that are less than 3 days old? I also need this to be automated (or run by a scheduled task in Windows)

Any assistance is greatly appreciated.
_________________
peg110
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
If all the files are in one folder, you can do something like:
option include *-2010-02-19;*-2010-02-18;*-2010-02-17

Of course you will need to generate the script file dynamically to update the dates.
_________________
Martin Prikryl
TK02
[View user's profile]
Donor
Joined: 2011-04-16
Posts: 1
Location: Sacramento, CA USA
Just started using, great program! Just donated using slightly different email address in paypal, then adjusted forum email address to match.

I can use your suggested workaround to dynamically include by datestamp in filename, but life would be much easier if synchronize command had -maxage argument to avoid pulling across old data. I leave to you the syntax; for me an integer number of days would suffice, but I could see usefulness in allowing all components of a date from years to seconds.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
TK02 wrote:
I can use your suggested workaround to dynamically include by datestamp in filename, but life would be much easier if synchronize command had -maxage argument to avoid pulling across old data. I leave to you the syntax; for me an integer number of days would suffice, but I could see usefulness in allowing all components of a date from years to seconds.

Thanks for your post and the donation! This request has been added to tracker.
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