How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
Horst.Epp
Power Member
Power Member
Posts: 6954
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *Horst.Epp »

I changed the Zip packer command line to
"C:\Program Files\7-Zip\7z.exe" -mcu=on -mx9
This maximizes the compression
and sets the Zip archive date to the newest file.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Peter18
Junior Member
Junior Member
Posts: 21
Joined: 2020-09-17, 04:58 UTC

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *Peter18 »

And just one more thing: For "packing" the pop-up window shows the 7-Zip logo in the top-left corner, but not in the case of "unpacking". I know, that you have been mentioned before, that for unpacking just the "normal" TC pop-up will show up, even if the "installed" 7-Zip is doing the actual job. But I just want to know to make it "sure" and ask that if I can be really confident about it..?
User avatar
petermad
Power Member
Power Member
Posts: 16009
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *petermad »

2Horst.Epp
"C:\Program Files\7-Zip\7z.exe" -mcu=on -mx9
This maximizes the compression
and sets the Zip archive date to the newest file.
I tested it a little when using 7z.exe as zip packer, and TC passes the Compression ratio from TC' ZIP configuration to the tz.exe program.
TC also passes the value of "Set ZIP date to newest file date" from TC's ZIP configuration to the packer.
So no need for the extra switches, Actually TC's compression setting overrides -mx9.

Also the 7-zip switch for setting archive date to newest file date is -stl - I cannot find any documentation for -mcu=on.

And why use 7z.exe that shows a DOS console for the packing progress, instead of using 7zG.exe that shows a nicer Windows progress dialog?
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
Horst.Epp
Power Member
Power Member
Posts: 6954
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *Horst.Epp »

petermad wrote: 2024-07-19, 16:04 UTC Also the 7-zip switch for setting archive date to newest file date is -stl - I cannot find any documentation for -mcu=on.
-mcu=on is explained in the 7zip switches.
It uses Unicode for file names if necessary, which is not the case with a default zip format.
TC has multiple options for this case, but it is not explained everywhere
which zip format TC options are in place, using 7zip to write a zip archive.

Btw. I never use zip archives, 7zip is so much better.
I only play with the zip options to follow the topics in this thread :)
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
User avatar
petermad
Power Member
Power Member
Posts: 16009
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *petermad »

2Peter18
But I just want to know to make it "sure" and ask that if I can be really confident about it..?
Well you cannot be completely sure. But if you use this setting:

Code: Select all

[Packer]
UnZIP=pkunzip.exe
InternalUnzip=0
And remove the [Associations] section

And then try to copy a file from inside a .zip file the you get the error:
---------------------------
Total Commander
---------------------------
Cannot find external pack program! You need to install and configure an external packer to handle this specific archive.
---------------------------
OK
---------------------------
But if you put the [Associations] section back in, you don't get that error, and the files is unpacked. That makes me believe that it is the plugin that does the unpacking.

But on the other hand - if you open a zip file, and then rename the Total7zip directory and then try to unpack a file, then the file is still unpacked even though the plugin files cannot be found in the configured location and use of the internal unpacker is disabled

So I guess only Ghisler can tell us how files are unpacked if a zip file is opened via an internal association to the Total7zip plugin.
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
petermad
Power Member
Power Member
Posts: 16009
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *petermad »

2Horst.Epp
-mcu=on is explained in the 7zip switches
Found it now under the -m switch. :-)
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
Peter18
Junior Member
Junior Member
Posts: 21
Joined: 2020-09-17, 04:58 UTC

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *Peter18 »

Yes, I already use the 7zipG.exe in my config file.

But:
1. Packing into zip works well, if 7zip_zip is selected in the TC's main Packer window.
But if I rather select "zip" in the 7-Zip's Packer configuration window (in the upper "dop-down" selection), itt will fail with this error: Image: https://imgur.com/3uHqYO8

These are the setting for both: Image: https://imgur.com/oANUMyA

2. Is there any way to check the zip and 7-Zip file's compression level afterwards?
I have the compression set to the maximum 9 in both the TC's Zip Packer config and also in the 7-Zip's (7zip_zip) config window. But how can I be sure, that it really uses this settings during the packing?

The TC's main Zip Packer settings: Image: https://imgur.com/9XDMoUq
User avatar
petermad
Power Member
Power Member
Posts: 16009
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *petermad »

itt will fail with this error: Image: https://imgur.com/3uHqYO8
You get this error when you try to change the "Archive format" in the configuration for 7zip_zip - leave it as 7z - it wil still produce a zip file

2. Is there any way to check the zip and 7-Zip file's compression level afterwards?
Only by packing the same files with 7zFM.exe with the same settings and comparing the resulting archives.
When using 7zFM.exe you do have to set the "Archive format" to pack a zip file, in contrary to the Toatl7zip plugin.
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
Peter18
Junior Member
Junior Member
Posts: 21
Joined: 2020-09-17, 04:58 UTC

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *Peter18 »

One more little bit "strange" thing I have noticed:
Unpacking ("Copying") a file from a zip or 7-zip file's Main directory into another zip or 7-zip file's Main or Subdirectory is working.

But unpacking a file from a zip or 7-Zip file's Subdirectory directly into another zip or 7-Zip file's other Subdirectory doesn't work. TC gives this error message: Image: https://imgur.com/jvR75mU

I'm just asking, if this can be considered as "normal" behavior, or something just still doesn't quite right here? :?:
User avatar
petermad
Power Member
Power Member
Posts: 16009
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to make 7-Zip as default .zip and .7z packer/unpacker in TC?

Post by *petermad »

2Peter18
But unpacking a file from a zip or 7-Zip file's Subdirectory directly into another zip or 7-Zip file's other Subdirectory doesn't work.
I can confirm that, both when using TC's 7z unpacker for .7z archives and when using 7zG.exe for packing .zip archives.

There is no such problem for .zip archives, when using TC's internal packer and unpacker for -zip archives.
There is no such problem for .rar archives, when using WinRar.exe for packing .rar archives and both WinRar or Internal RAR unpacker

I see the same problem for .arj archives, when using arj32.exe v. 3.10 for packing and both arj32.exe or Internal ARJ unpacker
I see the same problem for .lzh archives, when using lha32.exe v. 1.06 for packing and both lha32.exe or Internal LHA unpacker
I see the same problem for .ace archives, when using ace32.exe v 2.6 for packing/unpacking
I see the same problem for .tar archives, when using internal tar packer for packing/unpacking
I see the same problem for .tgz archives, when using internal tgz packer for packing/unpacking

For .arj, .lzh and .ace archives I also cannot add files to a subdir inside the archive directly from the harddisk.

I also see the problem with .7zip archives packed with the 7zip TC plugin (not the same as the Total7zip plugin)
I also see the problem with .sqx archives packed with the TotalSQX TC plugin (by forum member Lefteous).
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