Synchronize dirs using defined time/date range

English support forum

Moderators: white, Hacker, petermad, Stefan2

ssmietana
Junior Member
Junior Member
Posts: 6
Joined: 2010-09-07, 11:02 UTC

Synchronize dirs using defined time/date range

Post by *ssmietana »

Hallo,
When synchronize dirs, it is not posiible to define date range of the files to be synchronized ( e.g. - files not older than xx days )
I need every week to synchronize some dirs but only the newest( last modified) files.
Maybe there is a way to do it?
It would be also good to have a possibillity to define/edit synchronize filters ( such filters should then also contain this date/time range ).

Waiting for help
Best regards
Stefan
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is that the files on the left and right can have DIFFERENT dates. So for example if you set it to max 1 week old, TC would find only files on the left, but none on the right...
Author of Total Commander
https://www.ghisler.com
ssmietana
Junior Member
Junior Member
Posts: 6
Joined: 2010-09-07, 11:02 UTC

Post by *ssmietana »

ghisler(Author) wrote:The problem is that the files on the left and right can have DIFFERENT dates. So for example if you set it to max 1 week old, TC would find only files on the left, but none on the right...
Files with the same filename ( but older date) should be visible on the right side.
What I exactly need it is to find the files which were changed or created on left side during last x days and copy/overwrite them to right location.
Such possibility was present even in the old Norton Commander which I still used up to now to do such synchronization. Unfortunately after changing system to Win7 x64 I cannot use NC longer. Such synchronize filter is the only thing which is missing for me in TotCom. Other things are perfect.
Greetings Stefan
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

As long as you don't want to do an Asymmetric synchronization...

You could
1) create a filter for the date range you want.
2) Go to the directory you want.
3) SubDir Branch View in that directory.
4) Apply/Select your filter (Ctrl+F12 new Filter, select from list)
5) Select all of the files on the left.
6) Synchronize.

The only extra steps from your normal Sync would be the SubDir branchView, Apply the filter, and Select the files.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
ssmietana
Junior Member
Junior Member
Posts: 6
Joined: 2010-09-07, 11:02 UTC

Post by *ssmietana »

ad2 - directory I want is my whole data drive
Up to point 6 everything worked fine,
but Synchronize Directories command does not use selected files in Branch view, but scans again the drive and shows all older unnecessary files
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

After selecting the files on the left side, when you launch SyncDirs
the item "Only Selected" should be checked (underneath [compare] ).

No?
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
ssmietana
Junior Member
Junior Member
Posts: 6
Joined: 2010-09-07, 11:02 UTC

Post by *ssmietana »

Balderstrom wrote:After selecting the files on the left side, when you launch SyncDirs
the item "Only Selected" should be checked (underneath [compare] ).

No?
But "Only Selected" is dimmed - cannot be selected
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think TC can't pass branch view selection to sync tool.
ssmietana
Junior Member
Junior Member
Posts: 6
Joined: 2010-09-07, 11:02 UTC

Post by *ssmietana »

I think TC can't pass branch view selection to sync tool.
It looks like - any solution?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think the better solution is to ask Mr. Ghisler to add predefined templates support in mask field of sync tool...
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I was sure I went through those steps and started a Sync - I can't get it working now either :p

@MVV or allow us to add Filters to ignoreList -- as opposed to files by name only.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Balderstrom, nice idea, it would act like permanent filter. Even more, set of permanent filters.
ssmietana
Junior Member
Junior Member
Posts: 6
Joined: 2010-09-07, 11:02 UTC

Post by *ssmietana »

Are there any chances to have the solution for the problem in the near future?
If not, I must look for another program, which can manage my synchronization tasks.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

There's no solution atm.

There is a plugin feature for SyncDirs, but AFAICT it is for content only, and no one has written any plugins yet.

Something that might be useful, would be an addition to the context menu of SyncDirs: "Recompare Selected"

So for instance, you compare 2 folders, with nothing checked except for [x] Subdirs -- thus the comparison will be on Date and FileSize only.

You then sort your list by date, select the files you want to compare that are currently not equal. "Recompare Selected" after checking [x] By Content.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Notme
Junior Member
Junior Member
Posts: 14
Joined: 2011-06-02, 09:05 UTC

Re: Synchronize dirs using defined time/date range

Post by *Notme »

Hello!

Picking up this old thread, since it looks like I have the same problem and I wonder if there already is a solution to this.
I want TC to only consider the files with modify date/time within a certain range (or newer than a certain date/time), to save time by not comparing files I assume are not changed. That said, if there is a file within the range on one side, and a file with the same name, but outside the range on the other side, I still want them compared. If the modify time is the only difference, I want them to appear as equal (ignore date).

My approach:
1. Check "by content".
2. Click the ">>" next to it.
3. Check "Use plugin compare funcions".
4. Add -> Define -> Define selection.
5. Leaving "Search for" empty.
6. On the "Advanced" tab check "Date between" and set values.
7. Save as "Template name" 'Template1'.
8. OK -> "Select custom fields by file type" appears. Here I don't know what to do, so I leave it blank and click OK. Tried also "[=tc.Compare as text]".
9. OK -> "Compare"

And it is comparing all files, regardless of the time range i set.

I guess I am doing something wrong here so I'd appreciate some help :).
Post Reply