Repacking archive and the Move opt.
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 9
- Joined: 2008-06-19, 21:51 UTC
Repacking archive and the Move opt.
I have a fairly large archive in ZIP format. I wanted to convert it into 7z format. Of course, I have the 7z plug-in installed (Total7zip.wcx). In a panel I enter the ZIP archive and select all files and folders. Then I press the [Alt+F5] keys to launch the Pack files dialogue. By default, I have Also pack path names and Recursively pack subdirectories checked. Additionally, I select the option Move to archive. I expect that all files will be stored in the new archive and, finally, deleted from the existing archive. This is not happening. The files are in the new archive, but they are in the old one too.
In this case, that is not a problem, because if I want to repackage the entire archive, I can finally simply delete the ZIP file. However, I can imagine a situation where someone has a large archive with many files and folders and would like to transfer only selected files or folderes to the new archive. Then that can be a problem.
Ideally, this option should also work in such scenario. If this is not possible, it should probably be disabled for such operations.
In this case, that is not a problem, because if I want to repackage the entire archive, I can finally simply delete the ZIP file. However, I can imagine a situation where someone has a large archive with many files and folders and would like to transfer only selected files or folderes to the new archive. Then that can be a problem.
Ideally, this option should also work in such scenario. If this is not possible, it should probably be disabled for such operations.
Re: Repacking archive and the Move opt.
Move to archive doesn't move files from other archives, only from a simple directory structure. Although I'm not sure I think this is intentional, not a bug.
Regards
Dalai
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Re: Repacking archive and the Move opt.
If it is intentional (1), the checkbox ought to be disabled (or whatever other clear indication that moving files in this context is not possible)
-------
(1) It could be intentional; after all, deleting files from some archive types, especially solid archives, can be a slow/demanding/costly process. And who knows, depdending on whatever unusual "packer" plug-in in use, deleting/moving might not even be possible to begin with...
-------
(1) It could be intentional; after all, deleting files from some archive types, especially solid archives, can be a slow/demanding/costly process. And who knows, depdending on whatever unusual "packer" plug-in in use, deleting/moving might not even be possible to begin with...
Re: Repacking archive and the Move opt.
I agree.elgonzo wrote: 2020-09-20, 12:41 UTCIf it is intentional (1), the checkbox ought to be disabled (or whatever other clear indication that moving files in this context is not possible)
Well, even some of the real packer plugins may not be able to create archives or modify existing ones: deb, msi-plus, iso, and some of the formats of Total7zip (e.g. squashfs, rpm, nsis).And who knows, depdending on whatever unusual "packer" plug-in in use, deleting/moving might not even be possible to begin with...
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Repacking archive and the Move opt.
@gskoczylas
Some plugins or archive formats don't support some features, for example "moving inside" (packing and deleting the source file) or "moving outside" (unpacking and deleting from archive). Disabling unavailable features is a matter of plugin configuration, not a bug in TC itself. What plugin do you use for zip format?
Note that 7z is a solid archive and 7zip always creates a new archive and repacks all files if you use any command change archive (add, update, delete and even rename). Adding files to 7z in many steps is just a waste of time.
Some plugins or archive formats don't support some features, for example "moving inside" (packing and deleting the source file) or "moving outside" (unpacking and deleting from archive). Disabling unavailable features is a matter of plugin configuration, not a bug in TC itself. What plugin do you use for zip format?
Note that 7z is a solid archive and 7zip always creates a new archive and repacks all files if you use any command change archive (add, update, delete and even rename). Adding files to 7z in many steps is just a waste of time.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Re: Repacking archive and the Move opt.
1) Disabling the checkbox is a matter of TC, as the reported observation also applies to TC's built-in (un)packer functionality.Usher wrote: 2020-09-20, 14:59 UTC Disabling unavailable features is a matter of plugin configuration, not a bug in TC itself. What plugin do you use for zip format?
2) Afaik, a packer plug-in cannot tell TC whether "move" is supported or not. If i am mistaken, could you please let me know which API or configuration parameter a packer-plugin would use to tell TC its capabilities?
Re: Repacking archive and the Move opt.
2elgonzo
7z=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
flv=964,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
lst=21,%COMMANDER_PATH%\PLUGINS\wcx\diskdir\diskdir.wcx
It is the number after the = in the [PackerPlugins] section, that tells TC the capabilities of the plugin - for example:could you please let me know which API or configuration parameter a packer-plugin would use to tell TC its capabilities
7z=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
flv=964,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
lst=21,%COMMANDER_PATH%\PLUGINS\wcx\diskdir\diskdir.wcx
Notice that the Help file also says:Help wrote: The number is the sum of all capabilities:
1: Can create new archives
2: Can modify existing archives
4: Can handle multiple files in one archive
8: Can delete files from archive
16: Supports the options dialog
32: Supports packing in memory
64: Detects archive type by content
128: Allows searching for text in archives
256: Don't open with Enter, only with Ctrl+PgDn
512: Supports encryption
Do NOT add this number yourself, Total Commander will add it on the first load of the DLL.
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
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Re: Repacking archive and the Move opt.
2petermad
thanks!
I played around a little bit, creating packer plug-in entries without "Can modify existing archives" and "Can delete files from archive" bits/flags set (specifically, i used the value 724).
But, like with the built-in packer functionality, it does not have an effect on the "Move to archive" checkbox (with the respective packer plug-in serving as the file source). Move checkbox can still be enabled/checked, yet the files are not removed from the source archive, regardless whether the built-in packer functionality or the packer plug-in used for the file source are actually able to delete files from an archive...
thanks!
I played around a little bit, creating packer plug-in entries without "Can modify existing archives" and "Can delete files from archive" bits/flags set (specifically, i used the value 724).
But, like with the built-in packer functionality, it does not have an effect on the "Move to archive" checkbox (with the respective packer plug-in serving as the file source). Move checkbox can still be enabled/checked, yet the files are not removed from the source archive, regardless whether the built-in packer functionality or the packer plug-in used for the file source are actually able to delete files from an archive...

- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Repacking archive and the Move opt.
Moving files between archives is indeed not supported, because it would involve 2 separate pack operations.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Re: Repacking archive and the Move opt.
Then, ideally, the "Move to archive" checkbox should be disabled if the file source is an archive.ghisler(Author) wrote: 2020-09-22, 09:17 UTC Moving files between archives is indeed not supported, because it would involve 2 separate pack operations.
Re: Repacking archive and the Move opt.
I agree.Then, ideally, the "Move to archive" checkbox should be disabled if the file source is an archive.
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
-
- Junior Member
- Posts: 9
- Joined: 2008-06-19, 21:51 UTC
Re: Repacking archive and the Move opt.
It has always seemed to me that computers are there to make people's lives easier.ghisler(Author) wrote: 2020-09-22, 09:17 UTC Moving files between archives is indeed not supported, because it would involve 2 separate pack operations.

Seriously, if the TC does not do this, I have to do it manually. The result is the same, but I have to perform more actions, spending more time, and there is a greater risk that I will make a mistake.
-
- Junior Member
- Posts: 9
- Joined: 2008-06-19, 21:51 UTC
Re: Repacking archive and the Move opt.
It seems to me that to copy files from an archive in ZIP format to an archive in 7z solid format TC first extracts all (or selected) files to disk and then compress them in the 7z archive. I know that sometimes modifying an archive requires rewriting. I use this function consciously, knowing the consequences.Usher wrote: 2020-09-20, 14:59 UTC Note that 7z is a solid archive and 7zip always creates a new archive and repacks all files if you use any command change archive (add, update, delete and even rename). Adding files to 7z in many steps is just a waste of time.
From my point of view, I see no reason why the TC could not take one more step at the end of such process, which is to delete selected files from the source archive, even if this would result in rewriting the archive. The TC can already do any of these operations, so it seems to me that the implementation of this additional step should not require coding a complex algorithm. Of course, I do not know the source code of the TC, so I may be wrong about that.