cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

KozakMak
Senior Member
Senior Member
Posts: 478
Joined: 2021-05-24, 12:39 UTC
Location: UA

cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *KozakMak »

cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2 = ignore timestamp
OS: Win10 | TC: latest x64
KozakMak
Senior Member
Senior Member
Posts: 478
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *KozakMak »

up
OS: Win10 | TC: latest x64
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *petermad »

support++
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *ghisler(Author) »

What would be the difference to cm_CompareDirs 1 ?
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *petermad »

Probably nothing - the description:
Help wrote:1: Only selects files which do not exist on the other side
If I have two files with the same name and size but different timestamps, then cm_CompareDirs 1 will not mark any of them

Maybe KozakMak wants such two files to be both marked instead with parameter 2.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
KozakMak
Senior Member
Senior Member
Posts: 478
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *KozakMak »

ghisler(Author) wrote: 2024-10-14, 15:40 UTC What would be the difference to cm_CompareDirs 1 ?
1 - ignored size !

I suggest param 2 - its like default behavior, but ONLY ignore timestamp
OS: Win10 | TC: latest x64
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *petermad »

Currently I see this behaviour:

cm_CompareDirs:
Files with same size but different timestamp -> the newest file is marked
Files with different size but same timestamp -> both files are marked
Files with same size and date -> none of the files are marked
File only exists on one side -> the file is marked

cm_CompareDirs 1:
Files with same size but different timestamp -> none of the files are marked
Files with different size but same timestamp -> none of the files are marked
Files with same size and date -> none of the files are marked
File only exists on one side -> the file is marked

2KozakMak what is it that you want cm_CompareDirs 2 to do??

Is it this - cm_CompareDirs 2:
Files with same size but different timestamp -> none of the files are marked
Files with different size but same timestamp -> both files are marked
Files with same size and date -> none of the files are marked
File only exists on one side -> the file is marked
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
KozakMak
Senior Member
Senior Member
Posts: 478
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *KozakMak »

petermad wrote: 2024-10-15, 11:17 UTC Files with different size but same timestamp -> both files are marked
Files with different size but I DON'T CARE ABOUT TIMESTAMP -> both files are marked 8)

You are absolutely right! That's cm_CompareDirs 2 i want :roll:
OS: Win10 | TC: latest x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *ghisler(Author) »

Thanks for the explanation, I will add this.
Author of Total Commander
https://www.ghisler.com
KozakMak
Senior Member
Senior Member
Posts: 478
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *KozakMak »

16.10.24 Added: cm_CompareDirs, cm_CompareDirsWithSubdirs: New parameter 2 to select files with different sizes plus files which do not exist on the other side (32/64)
...and what about Timestamps ?

PS. in TOTALCMD.CHM param 2 not specified
OS: Win10 | TC: latest x64
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *petermad »

I can confirm that cm_CompareDirs 2 works as descibed here:
petermad wrote:Files with same size but different timestamp -> none of the files are marked
Files with different size but same timestamp -> both files are marked
Files with same size and date -> none of the files are marked
File only exists on one side -> the file is marked

I can also confirm that parameter 2 is not documented in the Help
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
KozakMak
Senior Member
Senior Member
Posts: 478
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *KozakMak »

petermad wrote: 2024-10-17, 01:37 UTC I can confirm that cm_CompareDirs 2 works as descibed here:
I confirm too!
but changelog doesn't mention it
OS: Win10 | TC: latest x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *ghisler(Author) »

2KozakMak
You quoted yourself where the changelog (history.txt) mentions it. Or do you mean the what's new section? I wonder whether I should mention such a small change there. It's just 2(!) lines of code...
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 324
Joined: 2021-09-10, 07:15 UTC

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *sa16 »

petermad wrote:I can confirm that cm_CompareDirs 2 works as descibed here:
What to do if:
Files with different size and different timestamp?
The same as when cm_CompareDirs without a parameter?
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: cm_CompareDirs, cm_CompareDirsWithSubdirs: parameter 2

Post by *petermad »

What to do if:
Files with different size and different timestamp?
Currently for files like that, the one with the newest filestamp is marked.
But I think it would be better if they were both marked just as Files with different size but same timestamp are
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply