Automating Synchronization

Advertisement

peg110
Joined:
Posts:
3
Location:
Pennsylvania

Automating Synchronization

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Automating Synchronization

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.

Reply with quote

TK02
Donor
Joined:
Posts:
1
Location:
Sacramento, CA USA

another request for limiting days old in synchronize

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: another request for limiting days old in synchronize

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.

Reply with quote

Advertisement

You can post new topics in this forum