Compare by contents with multiple files selected at least in one panel
Moderators: Hacker, petermad, Stefan2, white
Compare by contents with multiple files selected at least in one panel
When multiple files are marked in one of the panels (i.e more than 1), it would be nice if cm_CompareFilesByContent did not compare the first selected file in both panels. IMO, most of the time it's not useful (especially after executing cm_CompareDirs).
It would be better if it first checked if the selected file in the active panel (the one on which the cursor is placed) exists in the other panel and if so, compare those two files ignoring what is selected in both panels.
For instance, in this image, it should try to compare "File 2" in both panels, not "File 1" with "File 4" as done today.
If only one file is selected in each of the panels, it should works as today, compare those two selected files.
If two files are selected in one of the panels and none in the other, it should compare those two selected files.
If two files are selected in one of the panels and at least one in the other, it should work as proposed in this post.
A new INI option could be added that would change the way things work between what exists today and what is proposed above.
It would be better if it first checked if the selected file in the active panel (the one on which the cursor is placed) exists in the other panel and if so, compare those two files ignoring what is selected in both panels.
For instance, in this image, it should try to compare "File 2" in both panels, not "File 1" with "File 4" as done today.
If only one file is selected in each of the panels, it should works as today, compare those two selected files.
If two files are selected in one of the panels and none in the other, it should compare those two selected files.
If two files are selected in one of the panels and at least one in the other, it should work as proposed in this post.
A new INI option could be added that would change the way things work between what exists today and what is proposed above.
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Re: Compare by contents with multiple files selected at least in one panel
2wanderer
Until your suggestion might get implemented, you can use this button to compare the file under the cursor with a file with the same name in the other panel, no matter how may files are selected in either panel:
Until your suggestion might get implemented, you can use this button to compare the file under the cursor with a file with the same name in the other panel, no matter how may files are selected in either panel:
Code: Select all
TOTALCMD#BAR#DATA
%COMMANDER_EXE% /i="%COMMANDER_INI%" /S=C
%P%N %T%N
wcmicons.dll,49
Compare file under cursor with file with same name in other panel
-1
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
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
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
Re: Compare by contents with multiple files selected at least in one panel
That's great, works as expected. Thanks!
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Re: Compare by contents with multiple files selected at least in one panel
Ah, that works great only if the active panel is the left. If the right panel is active, CompareByContents shows the files reversed.
What i mean:
Left panel: Older file
Right panel: Newer file
If the active panel is the Right panel and you select the "Newer file", the button opens CompareByContents window and places that file in its Left panel! It's a little confusing but from what i've checked in the available parameters, there is no way to overcome this (apart from creating yet another button), right?
What i mean:
Left panel: Older file
Right panel: Newer file
If the active panel is the Right panel and you select the "Newer file", the button opens CompareByContents window and places that file in its Left panel! It's a little confusing but from what i've checked in the available parameters, there is no way to overcome this (apart from creating yet another button), right?
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Re: Compare by contents with multiple files selected at least in one panel
2wanderer
For this purpose, %X is used at the beginning of the parameters. It's strange that petermad didn't do it right away, because such examples have been given here many times.
For this purpose, %X is used at the beginning of the parameters. It's strange that petermad didn't do it right away, because such examples have been given here many times.
Overquoting is evil! 👎
Re: Compare by contents with multiple files selected at least in one panel
Sorry for that - this should fix it:wanderer wrote: 2024-10-07, 09:25 UTC Ah, that works great only if the active panel is the left. If the right panel is active, CompareByContents shows the files reversed.
Code: Select all
TOTALCMD#BAR#DATA
%COMMANDER_EXE% /i="%COMMANDER_INI%" /S=C
%X%P%N %T%N
wcmicons.dll,49
Compare file under cursor with file with same name in other panel
-1
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
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
Re: Compare by contents with multiple files selected at least in one panel
Wow! I'm impressed TC already had a solution for this. It seems i've missed it.
Many thanks for it.
Many thanks for it.
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.