Find files: Unpackers selection and priority

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Find files: Unpackers selection and priority

Post by *DrShark »

This suggestion does not touch unpacker selection or priority for Alt+F6 or Open archive features because of different use-cases which require different design. So for them I posted separate suggestion here.

This suggestion, if implemented, will allow user to choose archive types and packers they want to use each time they use "Find files" "Search Archives" feature.

When "Search archives" item on "General" tab of "Find files" window is active, new separate tab of "Find files" window, called "Search Archives", must be available. It will have to consist of two Search Archives modes: basic and advanced.

In Basic mode search in archives will operate like it does now. A field for configuration of SearchInFiles wincmd.ini parameter can be added here.

Advanced mode will have list of templates (similar to "Load/Save" "Find files" window tab). Each template will define in what archives user want to search and what unpackers want to use. Default template may be a configuration for default Total Commander's Search Archives settings. With "Advanced mode", SearchInFiles wincmd.ini setting and all other settings TC use in Basic mode will be ignored, because if user wants they still may be enabled, in more flexible way, in any "Advanced mode" template.

Each template have extensions list field, with wildcards like *.* or *.r?? allowed. It may be dropdown list but I think it's better to make it as a text field with possibility to select several extensions. Anyway, near the field we put a "Configure selected" button. For extensions selected in the extensions list field, "Configure selected" button calls window with next options:
1. Unpackers. It consist of movable list (similar to one in "Configure this custom columns view..." - each field of the list can be moved, changed or removed) of unpackers user want to use for extension(s). This list created by user using available "Add unpackers" button. Pressing the button will call dialog with following options:
a) "load a list of all available unpackers" (internal, external, WCX), then user can manually remove unnecessary;
c) "try to detect packers for extension" - will load only unpackers that match extension in wincmd.ini. Packers that can detect archive type by header also may be present here, especially if our extension contains wildcards.
c) "load unpackers list from other template" may also add some automation.
d) "add manually": window with drobdown list of all unpackers and "Manually add" button to add selected to the list.
e) checkbox "Replace current list", applies to any of above options. If not active - unpackers added to items in the list.
If user added more than one unpacker for extension, both will be called during search, in their sort order, for a file with that extension; in results list found files/folders may be divided by groups for each used unpacker, like it's currently done when "Find duplicate file" used.
2. Try to search in sub-archives.
3. Try to search for text. Option used only if "Find text" selected in main "Find files", but "Try to search for text" setting has higher priority, so this way search for text may be disabled only for selected archive extensions.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Now I have a better designed interface suggestion.

When checkbox "Search in archives" enabled, activate checkboxes and fields:
[ ] All except UC2 (default)

[x] Select formats (not detect by archive content):
      [x] Internal: [*.zip *.zipx *.arj *.lha *.rar *.tar *.gz *.tgz *.cab *.ace *.7z][v]
      [x] External: [x]ZIP [x]ARJ [x]LZH [x]RAR [x]ACE
      [*.zip *.zipx *.arj *.lha *.rar *.ace][v]
      [x] Plugins: [*.ext1 *.ext2 *.ext3][v][Select>>]
[x] Select formats (detect by archive content):
      [x] Internal (TC detects format): [x]ZIP [x]ARJ [x]LZH [x]RAR [x]TAR [x]GZ [x]CAB [x]ACE [x]7ZIP
      [*.*][v]
      [x] External (TC detects format): [x]ZIP [x]ARJ [x]LZH [x]RAR [x]ACE
      [*.*][v]
      [x] Plugins: [plugin_name1, plugin_name2, plugin_name3][v][Select>>]
      [*.*][v]
Notes for this interface:
1. The search without detection of archive by its content relies on extensions and the checkboxes [x]ZIP [x]ARJ etc. in External subgroup are there to disable the using of certain external unpackers defined in TC's Configuraton.
2. The search with detection of archive type by its content reliex on unpacker, and not an extension (that's why user selects plugin names that are added to the list of plugins to use), and the fields for extensions (like [*.*]) are ther too to be able to limit unpackers to certain extensions (i.e. I want to use wcx plugins name1 and name2 for search by content only in *.exe, but not in *.dll, *.icl etc, so I put *.exe instead of default *.*)
3. [Select>>] button in plugins sholud allow user to select one or more plugins from installed plugins list.
The one from "no detect by archive content" shows all wcx plugins. After archive it selected, extensions registered to it are pasted in below exts list ([*.ext1 *.ext2 *.ext3]). Of course user can input own extensions there and if some matches to plugin's registered, TC uses these plugins. While searching TC tries the selected plugin even if open on Enter action is disabled for it.
The one from "detect by archive content" pre-filter the plugins list and allows to select only from those with "Can detect by content" flag active.
4. I don't really know whether or not TC can use internal or external unpackers to detect archive type by content, and if it can how extactly TC does it (detects by itself or asks the unpacker). But still I added subgroups "Internal (TC detects format)" and "External (TC detects format)" to show how it may look if TC somehow can us these unpackers to serch for archives detecting them by content.
5. Checkboxes in subgroup become active (user is able to check them) if one for group is enabled. All the options inside subgroups, as well as the groups, not conflict with each other (i.e. user can use all): TC will shot the content of archive filename.exe several times in results list if different unpackers were used to search in it). This will allow to search for example for packed files of SFX archive and the internal resources (like icons, etc) of the same SFX EXE with one search.
6. Selecting at least one of "Select formats" group makes "[ ] All except UC2 (default)" checkbox inactive, and vice versa (they can't be used together).
Last edited by DrShark on 2017-03-22, 18:29 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Can you explain why it's a good idea to not search all archive types?
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Lefteous wrote:Can you explain why it's a good idea to not search all archive types?
Case 1: I's like to search only in 7z and cab archives (fewer than "All except UC2" allows). I'm saving search time. Also this minimizes chances for search to be aborted because of crash in some unpacker during search.
Case 2 : SFX examle from suggestion post post (TC tries even more unpackers on archive than with default "All except UC2" allows). Quality of the search improves.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Hammillian7
Junior Member
Junior Member
Posts: 98
Joined: 2003-07-16, 22:40 UTC
Location: Spain

Req 4 search archive selection & missing password skippi

Post by *Hammillian7 »

Hi. I've come here looking for a way to tell TC to look for files inside certain archives, but not all (to save search time, crash probability and, even more important, replying to windows asking for a password in encrypted archives (actually, there should be an option "skip archives requesting password", for encrypted archives for which TC doesn't yet know the password) ).

I believe to remember this is an old requirement from some users, that I understand is not yet implemented, by the search results to my search question (if I'm wrong, please advise me).

It might seem of little importance, but my decision about organizing my archiving of my data in external hard disks based on zips depends mainly on this single feature.

So, I decidedly support this suggestion. About its interface, I say nothing at this moment. I suppose any reasonable one will do (but the selection definition should be permanent in the configuration until explicitly changed).
Thanks,
Jose

Nubia Redmagic 7Pro with non-rooted Android 13
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You could search for the archives, feed them to listbox, select them, and then search in the selection. Or use branch view and select the archives you want to search.
Author of Total Commander
https://www.ghisler.com
Post Reply