Total7zip

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Total7zip

Post by *petermad »

I meant renamed 7z archives. Let's say a .cb7. If it's not associated with anything pressing enter will open it and show the files just like when the extension is 7z, even though TC doesn't show it with an archive icon. But when I press F5, I get the unsupported function.
Under that circumstance (.7z files with renamed extension) I can confirm that it is NOT possible to copy a file into the archive if it is opened with Enter, but it is when it is possible when opened with Ctrl+PgDn.

I can however copy files from the archive to a folder even if the archive is opened with Enter.

Also I cannot delete files in the archive if I have opened it with Enter, just as I cannot delete files in the archive if I have disable the Total7zip plugin.

So the difference seems to be that when pressing Enter on the file It is TC's own TC7Z64.DLL that exclusively handles the archive - and TC7Z64.DLL can only open archives and extract files from archives. When pressing Ctrl+PgDn the Total7zip plugin is handeling copying to the archive, and deleting files in the archive - hence no error message. When pressing Ctrl+PgDn I don't know whether it is Total7zip plugin that opens the archive or copies files from it or that is done by TC7Z64.DLL.

In contrast to Total7zip that apparently handles archives with unknown filetypes when pressing Ctrl+PgDn, it seems like the 7zip plugin only handles (extracting and deleting) archives with extensions that it is registered to in wincmd.ini. This leads me to believe that it is always TC7Z64.DLL that opens unknown filetypes, when pressing Ctrl+PgDn.

My 7zip.wcx plugin is registered with the parameter 223 and my Total7zip.wcx plugin is registered vith parameter 735, and that means that both plugins should be able to "Detect archive type by content", but apparently 7zip does not do so.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
beb
Senior Member
Senior Member
Posts: 430
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Total7zip

Post by *beb »

Dalai wrote: 2020-11-10, 14:27 UTC 2beb
Total7zip doesn't register itself as Lister plugin by default. So the question is: Why did you do so manually? If you don't need it as Lister plugin, just remove it as such (it still works as packer and/or content plugin). To answer your question: Extensions can be excluded by setting a _detect line in wincmd.ini, like this:

Code: Select all

14_detect="EXT!="MD5""
Regards
Dalai
Just guys to your notes:
Now I came across a need to add some more exclusion entries there and the above method seemed to not work at first approach.
E.g., this syntax instance doesn't work at all (neither for md5, nor for txt):

Code: Select all

14_detect="EXT!="MD5" | EXT!="TXT""
The solution I've found is to put each and every EXT! in its own double quotes.
E.g., this syntax instance would work for any number of exclusion entries:

Code: Select all

14_detect=""EXT!"="MD5" | "EXT!"="TXT" | "EXT!"="SHA" | "EXT!"="BLA""
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Total7zip

Post by *Dalai »

2beb
The exclamation mark does not belong within the quotes, and there shouldn't be any quotes around EXT anyway. I'm not sure why this

Code: Select all

14_detect="EXT!="MD5" | EXT!="TXT""
doesn't work for you. However, it should work like this:

Code: Select all

14_detect="(EXT!="MD5") | (EXT!="TXT")"
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
beb
Senior Member
Senior Member
Posts: 430
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Total7zip

Post by *beb »

  • Dalai wrote: 2022-09-16, 13:24 UTC I'm not sure why this... doesn't work for you.

    Code: Select all

    _detect="EXT!="MD5" | EXT!="TXT""
    I don't know either but it doesn't.
  • Dalai wrote: 2022-09-16, 13:24 UTC However, it should work like this ...

    Code: Select all

    _detect="(EXT!="MD5") | (EXT!="TXT")"
    Alas, but it doesn't too.
  • Dalai wrote: 2022-09-16, 13:24 UTC The exclamation mark does not belong within the quotes, and there shouldn't be any quotes around EXT anyway.

    Code: Select all

    _detect=""EXT!"="MD5" | "EXT!"="TXT""
    Nevertheless, somehow that's the only [tested] syntax that does work.
Cheers

Edit:
That's an example of a tiny text file in question that is being intercepted by the total7zip as an archive unless TXT is excluded with the EXT! method:
https://www.mediafire.com/file/yzwojtdankbu8xz/total7zip_detect_exclusion_TEST1_TXT_detected_as_Archive.zip
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Total7zip

Post by *Dalai »

Yes, well, the pipe symbol is used so often that everyone - including myself - seems to forget that it stands for a boolean OR. What is needed in this situation is a boolean AND operator. You want TC to check if the extension is NOT MD5 and NOT TXT, and pass what is left (which is everything else) to the given plugin.

The following ones work as expected:

Code: Select all

14_detect="(EXT!="MD5") & (EXT!="TXT")"
14_detect="EXT!="MD5" & EXT!="TXT""
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
beb
Senior Member
Senior Member
Posts: 430
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Total7zip

Post by *beb »

2Dalai

Yes, &/AND operator works as intended.
Strange thing, I kind of tested it too in the morning, but somehow it happened I've missed that it also gives a positive result.
Thank you.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
beb
Senior Member
Senior Member
Posts: 430
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Total7zip

Post by *beb »

Dalai wrote: 2022-09-16, 17:45 UTC ...
The following ones work as expected:

Code: Select all

14_detect="(EXT!="MD5") & (EXT!="TXT")"
14_detect="EXT!="MD5" & EXT!="TXT""
Regards
Dalai
It turns out this is case-sensitive, and those are the different entities:
14_detect="ext!="md5" & ext!="txt"" processes a TESTFILE.txt as an archive, so the exclusion does not work.
14_detect="ext!="md5" & ext!="TXT"" processes a TESTFILE.txt as a text file, as intended.
I just don't understand that. Why it is as such? Is it a bug?
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Total7zip

Post by *Dalai »

That's probably how it's supposed to work. The WLX SDK says:
The syntax of the detection string is as follows. There are operands, operators and functions.
Operands:
EXT The extension of the file to be loaded (always uppercase).
I never tested or used lowercase extensions in the detection string. Only Ghisler can answer if this is a bug, but I doubt it.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
beb
Senior Member
Senior Member
Posts: 430
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Total7zip

Post by *beb »

Dalai wrote: 2022-11-09, 18:50 UTC Operands:
EXT The extension of the file to be loaded (always uppercase).
Thank you. So now I need to entirely rearrange my plugins .ini (and it took just 1000+ entries to find and replace, praise to the smart people who invented regexp)
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Peter
Power Member
Power Member
Posts: 2064
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Re: Total7zip

Post by *Peter »

Hi

just to refresh my knowledge:
- On totalcmd.net there is the version 0.8.5.6 from 2012
- on https://www.ghisler.com/plugins.htm there is "8.56 / 0.8.5.6?" from 2023-06-20
- and here are 27 pages of discussion...

I understand the plugin on Ghisler as a fix for the current security issue, but is this plugin under current development and is there an "official and current / new" download somewhere?

Thanks and regards!
Peter
TC 10.xx / #266191
Win 10 x64
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Total7zip

Post by *Horst.Epp »

Peter wrote: 2023-09-08, 17:38 UTC Hi

just to refresh my knowledge:
- On totalcmd.net there is the version 0.8.5.6 from 2012
- on https://www.ghisler.com/plugins.htm there is "8.56 / 0.8.5.6?" from 2023-06-20
- and here are 27 pages of discussion...

I understand the plugin on Ghisler as a fix for the current security issue, but is this plugin under current development and is there an "official and current / new" download somewhere?

Thanks and regards!
Peter
The version of the plugin itself is not important.
You can always add the current 7-zip DLLs into the plugin dir.
So the plugin work for me with the files from version 23.01
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Total7zip

Post by *Dalai »

Peter wrote: 2023-09-08, 17:38 UTC[...] but is this plugin under current development and is there an "official and current / new" download somewhere?
There is no development AFAIK. It's just an updated archive to make sure everyone can use the new version of 7-zip (23.01) immediately without having to update it themselves.

Curiously, some files have not been updated for some reason, namely "7-Zip History.txt", 7-zip.chm and License.txt.

NB: The version 8.56 is wrong on the homepage and should be corrected; it's still 0.8.5.6.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Profane0360
Junior Member
Junior Member
Posts: 19
Joined: 2023-08-31, 20:08 UTC

Re: Total7zip

Post by *Profane0360 »

Two questions, please:

(1) I cannot create a .tar.xz or .tar.bz2 file from more files in one shot, right? I first have to create the .tar and then to do the .xz or .bz2.
(2) Bzip2 allows two extensions, .bz2 and .bzip2. Is there a difference? Which one is the default extension to use?

Thank you!
#155067 Personal licence (March 2007)
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Total7zip

Post by *Dalai »

Profane0360 wrote: 2023-09-24, 15:14 UTC(1) I cannot create a .tar.xz or .tar.bz2 file from more files in one shot, right?
For me this works on one step, but I use (two) dedicated plugins for bzip2 and xz. Still, I think that it's going to work with the Total7zip plugin. Just give it a shot.
(2) Bzip2 allows two extensions, .bz2 and .bzip2. Is there a difference? Which one is the default extension to use?
I don't think there's any difference other than the extension itself. On Linux systems you probably run into .bz2 files much more often than .bzip2 files.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Profane0360
Junior Member
Junior Member
Posts: 19
Joined: 2023-08-31, 20:08 UTC

Re: Total7zip

Post by *Profane0360 »

Thank you. This is how I do this as well, with the separate bz2 and xz plugins, and I have nothing to complain about. I was thinking about removing the two and staying on Total7zip alone…
#155067 Personal licence (March 2007)
Post Reply