Fully functional substitute for the internal zip - with support for TC's packing precise customization

English support forum

Moderators: white, Hacker, petermad, Stefan2

odeon
Junior Member
Junior Member
Posts: 22
Joined: 2009-07-29, 05:44 UTC

Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *odeon »

Hello!

I need to make a complicated (rather) packing operation with a set of folders (around 300):
These folders all are named 'res', and are placed inside other folders (one 'res' folder in a separate upper-level other folder with random name).
I need to pack these 'res' folders one by one into separate zip archives which should be placed into the same folder the original folders 'res' were situated.
Then delete the original folders.
Inner structure of the res folders shall be untouched, but no upper level 'res' folder inside the new archives.

All the above TC can do (I search for folders with name 'res', feed to list box, select all, pack, tick 'also pack path names', 'recursively pack directories', 'move to archive', 'create separate archives...', 'leave out base directory...') and also manually delete the suggested path, only leaving the 'zip:*.zip' inside the 'Pack files' menu text line.

Great, the result is exactly as the task described above!

But the thing is, TC's inner packer makes zips that are for some reason not compatible with the GoldenDict dictionary. Zips made by other developers (7zip, winrar) are compatible. But those archivers can't do this complicated task.

Frankly i wasn't able to figure out what's wrong with TC's zips or with the GoldenDict's comprehension of them. When I try to manually set zip packer in TC's config as winrar's or 7-zip's .exe file, they produce errors (winrar asks for passwords then exits with 'not enough memory' message).

Please recommend which zipper can be used inside the TC for this kind of task or perhaps guide how to configure inner zipper to produce different results that maybe will work
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *petermad »

2odeon
Which compression rate have you set TC's internal zip to use? If you have set it to 10 the files might not be readable to certain other programs.

viewtopic.php?t=34782
viewtopic.php?p=398220#p398220

Help wrote:LzmaAllowed=0 1: ZIP packer: Allow LZMA compression (not recommended, needs WinZip >=12 to unpack). When enabled, you can choose a pack rate of 10 for LZMA.
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
odeon
Junior Member
Junior Member
Posts: 22
Joined: 2009-07-29, 05:44 UTC

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *odeon »

2petermad
I've set it to normal, fastest as well as maximum, but the results were the same. No LZMA was activated either.
Last edited by odeon on 2021-10-24, 09:08 UTC, edited 2 times in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *Horst.Epp »

I tried it and it works.
The pack rate was set to 10.

I checked the resulting zip with WinRAR which shows
Version to extract 6.3/LZMA
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
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *Horst.Epp »

odeon wrote: 2021-10-24, 07:41 UTC 2petermad
I've set it to normal, fastest as well as maximum, but the results were the same. No LZMA was activated, too
Maximum is not enough, you have to set the internal Zip compression to other and 10
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
odeon
Junior Member
Junior Member
Posts: 22
Joined: 2009-07-29, 05:44 UTC

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *odeon »

What's I've also found out is that the packing method should be (for the purposes of compatibility with the GoldenDict program), the 'Deflate' one strictly, and none of the others.

How do we set the TC to produce such zip archives? Or is the 'Deflate' algorithm already the default one?

2Horst.Epp
Particularly now I don't need LZMA (which can be great for some cases where strong compression is needed, so very helpful collateral benefit here ))
On the opposite, I seek some universal, most widely compatible way for TC to zip files, deflate method in this case, not LZMA which requires advanced unpacking ability in the software which uses zip-archives internally.

Classic pkzip supports deflate since version 2, but if I set c:\Program Files\PKWARE\PKZIPC\pkzipc.exe as path to the packer .exe, it produces errors
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *petermad »

2odeon
How do we set the TC to produce such zip archives? Or is the 'Deflate' algorithm already the default one?
If I pack with TC's internal zip-packer and then afterwards right-click on a file inside the archive, then the Method is reported as deflated
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
odeon
Junior Member
Junior Member
Posts: 22
Joined: 2009-07-29, 05:44 UTC

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *odeon »

2petermad
thanks for the info, then not the compression method is the cause (but what then? what else specifics can TC add or not add to the zip-archives that Winrar/7zip do/don't do?).

Seems that something changed in the TC's internal zip-packer over program updates. Previously TC-made zips were compatible with the GD internal unpacker. But I don't already remember the exact version number where it worked, will move back in time and try one version by one ))
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *petermad »

2odeon
If you have the Total7zip plugin installed you can try this:

In your [PackerPlugins] section of your wincmd.ini add this:

Code: Select all

7zip_zip=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
(change the path if you have installed the plugin elsewhere)
Restart TC
Now when you pack, choose 7zip_zip - the Pack files dialog will show the file extension as 7zip_zip, but the outcome will be a zip file nonetheless.
Last edited by petermad on 2021-10-24, 12:46 UTC, edited 3 times in total.
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
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *petermad »

2odeon
Seems that something changed in the TC's internal zip-packer over program updates
What is your setting in "Configuration" -> "Options..." -> "Zip packer" -> "Additional settings" -> "Pack unicode names:"?
If it is set to "Store all as UTF-8 (Pkzip 4.5/Winzip 11.2 metod)" that could be the problem. Some of the other settings could also be the problem if there are Unicode characters in your selected files/folder names.


will move back in time and try one version by one
The "Pack unicode names" option was introduced in TC 7.50
history.txt wrote:05.12.07 Added: ZIP packer: Let the user choose in the main config dialog how to pack files with Unicode names (default: ask user)
30.11.07 Added: ZIP packer: Let the user choose how to store Unicode names in ZIP files.
28.11.07 Added: Unicode support for internal ZIP packer. So far, Unicode characters are stored as "?" as in Winzip
So if it turns out to work for you with TC prior to version 7.50, this change is probably the reason.
Last edited by petermad on 2021-10-24, 12:48 UTC, edited 4 times in total.
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
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *Dalai »

I suggest to (temporarily) try with a fresh wincmd.ini file to rule out any misconfiguration and to find out if TC creates "incompatible" ZIP files (which I doubt):

Code: Select all

totalcmd.exe /i="%temp%\fresh.ini"
Replace totalcmd.exe with totalcmd64.exe if you use TC 64-bit.

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
odeon
Junior Member
Junior Member
Posts: 22
Joined: 2009-07-29, 05:44 UTC

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *odeon »

Thanks for your advices!

2petermad
What is your setting in "Configuration" -> "Options..." -> "Zip packer" -> "Additional settings" -> "Pack unicode names:"?
It is 'Ask every time a Unicode name is encountered', tried to change it to "Store Unicode name in extra field (Info-Zip method) with same results as before.

2Dalai
Reverting to the default settings didn't work either ((
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *petermad »

2odeon
Did you try the
7zip_zip=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
setting I mentioned here: viewtopic.php?p=406673&sid=5066e03d88cc13727896a55c71a646e3#p406673 ?
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
odeon
Junior Member
Junior Member
Posts: 22
Joined: 2009-07-29, 05:44 UTC

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *odeon »

2petermad
Did you try the
7zip_zip=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
setting I mentioned here
Tried just now, and this your advice worked its magic! Great hint, thanks.
There were though some garden paths which led me to a slightly different way of things to happen ))
I did all exactly as you proposed, but I also clicked the configure button in the packing menu, the 7z window appeared, I changed there the format from 7z to zip, then OK, some process started and gave out an error. I was back to the TC's packer menu, clicked ok, then the archiving started and produced a zip archive (not the 7zip_zip one, which simplifies the tasks as there's no need to rename the resulting files).
I'll dig into this plugins configs to find out how to make zip the default archive format (not to change it manually everytime) and voila - zip is compatible and working, and all the TC's archive handling features are available.
Thanks again!

UPD
For those possibly concerned (whose TC-made zip-archives are not in compliance with other software product's specifics):
Using Total Commander 8.51a presumably solves this issue (like it did in my particular situation).
Version 8.51a produces zip-archives which (in my case) do not have incompatibility issues with some other software (maybe that's this other software's issue, not TC's, it doesn't matter since now there's a workaround)
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Fully functional substitute for the internal zip - with support for TC's packing precise customization

Post by *Dalai »

2odeon
Well, it's always a good idea to test with a current software version before complaining about an issue. TC makes that part particularly easy, providing several different ways to use multiple versions at the same time.

Does it work in one of the latest stable TC versions, like 8.52a, 9.0a, 9.51 or 10.0? Which version did you use previously?

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
Post Reply