By default, if i select a file in one panel and press compare by content it will automatically selects the file with same name from the other side.
The toolbar button parameter should do the same with "%Z%C1 %Z%C2".
It works if the sides are not inside an archive, but if both sides in an archive, and the file i want to compare are under a sub directory inside the zip file, the custom toolbar button version cuts off the subdirectory from the other side's file path.
Eg: for zip files a.zip and b.zip, and file under the directory "subdir", when i am in the subdir on both sides and the cursor is on the file in the a.zip's side i get a.zip\subdir\readme.txt and b.zip\readme.txt instead of the b.zip\subdir\readme.txt
With the internal compare by content it works.
If I explicitly select the file on both sides it works with the custom toolbar too. So possible something wrong with the "filename match" part of the thing for archives.
Toolbar "%Z%C1 %Z%C2" cuts of archive subdirectory on filename match
Moderators: Hacker, petermad, Stefan2, white
Re: Toolbar "%Z%C1 %Z%C2" cuts of archive subdirectory on filename match
Confirmed
If I use a button like:
For me it does not matter whether the file in the archive is in a subdir or not.
If I have for example these two files:
c:\test\file.txt
c:\test\file.zip
and inside c:\test\file.zip is the file file.txt but with a different content than c:\text\file.txt, then if I have the cursor on c:\test\file.txt on the left side and i have c:\test file.zip opened on the right side, then the two paths shown when I use cm_IntCompareFilesByContent are:
c:\test\file.txt
C:\TEMP\_tc\file.txt
But if I use the button here above these paths are shown:
c:\test\file.txt
c:\test\file.zip\file.txt
So with the customized compare button the archive file is not recognized as such and is therefore not unpacked to be compared.
But I would categorize this a missing feature rather than a bug.
If I inside the c:\test\file.zip file also has a subdir with a file.txt file inside - I can confim that the path is only shown as c:\test\file.zip\subdir\file.txt when I explicitly select the file c:\test\file.zip\subdir\file.txt (or make the right side the active side and place the cursor on file.txt) - otherwise c:\test\file.zip\file.txt is shown - This I consider to be a bug!
If I replace %C2 with %T%M and don't mark c:\test\file.zip\subdir\file.txt the path is shown correctly for the right side.
2crash5
If I use a button like:
Code: Select all
TOTALCMD#BAR#DATA
%COMMANDER_EXE% /i="%COMMANDER_INI%" /S=C
%Z%C1 %C2
wcmicons.dll,49
menu=Compare Contents (separate instance)
-1
Then if one or both sides are inside an archive, I get the message: "Left file not found!" or "Right file not found!".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".
For me it does not matter whether the file in the archive is in a subdir or not.
If I have for example these two files:
c:\test\file.txt
c:\test\file.zip
and inside c:\test\file.zip is the file file.txt but with a different content than c:\text\file.txt, then if I have the cursor on c:\test\file.txt on the left side and i have c:\test file.zip opened on the right side, then the two paths shown when I use cm_IntCompareFilesByContent are:
c:\test\file.txt
C:\TEMP\_tc\file.txt
But if I use the button here above these paths are shown:
c:\test\file.txt
c:\test\file.zip\file.txt
So with the customized compare button the archive file is not recognized as such and is therefore not unpacked to be compared.
But I would categorize this a missing feature rather than a bug.
If I inside the c:\test\file.zip file also has a subdir with a file.txt file inside - I can confim that the path is only shown as c:\test\file.zip\subdir\file.txt when I explicitly select the file c:\test\file.zip\subdir\file.txt (or make the right side the active side and place the cursor on file.txt) - otherwise c:\test\file.zip\file.txt is shown - This I consider to be a bug!
If I replace %C2 with %T%M and don't mark c:\test\file.zip\subdir\file.txt the path is shown correctly for the right side.
2crash5
You don't have to repeat the %Z parameter, one time is enough."%Z%C1 %Z%C2"
I guess that you are not using TC as the external compare tool, since this works for you.If I explicitly select the file on both sides it works with the custom toolbar too.
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: Toolbar "%Z%C1 %Z%C2" cuts of archive subdirectory on filename match
I used the orignal compare by content button for the internal compare. That worked for me.
I only have the problem when I try to use an external app for the compare, that is when the "match the file from other side with the same name" don't work.
Easier to test with a dummy button with the parameter set to "?%Z%C1 %C2", so you can see that it cut off the subdir part from the second path. I think that is the problem when you try it with a custom internal compare button too, it don't get the proper path in this case from the passed parameters.
I only have the problem when I try to use an external app for the compare, that is when the "match the file from other side with the same name" don't work.
Easier to test with a dummy button with the parameter set to "?%Z%C1 %C2", so you can see that it cut off the subdir part from the second path. I think that is the problem when you try it with a custom internal compare button too, it don't get the proper path in this case from the passed parameters.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Toolbar "%Z%C1 %Z%C2" cuts of archive subdirectory on filename match
I agree that %C2 should contain the archive subdirectory. However, this will not help you here because the compare tool can't unpack files by itself, this is done by cm_CompareFilesByContent before calling the compare tool.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Toolbar "%Z%C1 %Z%C2" cuts of archive subdirectory on filename match
My problem is only that the %C2 is missing the subdirectory, I use it with an external tool not with the internal compare.