Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

mike94

Re: Synchronize & Compare files only older than "X"

You are right, that was clearly my spelling mistake. My problem has now been fully resolved thanks to your reply in my other post.
Synchronize only Directories from the last day
martin

Re: Synchronize & Compare files only older than "X"

I understand why you might want to download files from the last 2 days. But you have asked to download files older than 2 days.
mike94

Re: Synchronize & Compare files only older than "X"

Hi Martin,

Thank you for your reply. The reason why I thought to download the files from the last two days is that everyday I'm executing the script in Windows Task Scheduler, and if for some reason one day the script does not get executed, next time it executes it will also download the missed call recordings from the previous day. It takes just a bit extra time to compare directories from two days rather than a single day, but it ensures failover should some files have not been downloaded previously.
martin

Re: Synchronize & Compare files only older than "X"

I do not understand how downloading files older than 2 days would improve the performance. Didn't you mean downloading files newer than 2 days?
Your other post seems to confirm that:
Synchronize only Directories from the last day
mike94

Synchronize & Compare files only older than "X"

Hi,

I know there are similar topic on the forum, but I can't seem to get it working they way I would like to have it.

Basically, I've got a WinSCP script implemented in Windows Task Scheduler, which connects to a remote directory and it copies all new files to a local directory, using the synchronize local feature. Back in a day it was a perfect and simple script, but now there are so many files in the local directory, so the script has to compare all of them and then download what is missing locally.

Is there a way to synchronize only the files which are older than "X" days, let's say 2 days ? By doing this the script would be executed every day as usual only copying the latest files, but thanks to "2 days parameter" it could also synchronize the files from the previous day in case they were skipped in the previous job.

I have placed the current version of the script below:
option batch abort
option confirm off
open sftp://******************:2222
synchronize local C:\test /mnt/backups
pause

The files which I'm backing up are the call recordings, and every day a new folder is created which has another sub folders inside of it. Maybe this could be used to apply the correct filemask and get the best outcome. The typical path looks something like below:

I hope it all makes sense.