Group by "Type"

Features wanted...
Post Reply
steverance
Posts: 30
Joined: 16 Nov 2022 23:52

Group by "Type"

Post by steverance »

Some of our users have expressed the ability to be able to use the "group by" feature available in Windows Explorer.
I cant seem to locate a native way of doing this in XY ... is this possible?

For example ...
Screenshot 2023-01-03 091642.png
You do not have the required permissions to view the files attached to this post.

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Group by "Type"

Post by admin »

Nope.

GreetingsFromPoland
Posts: 284
Joined: 29 Sep 2022 14:20
Location: Win10 @125%

Re: Group by "Type"

Post by GreetingsFromPoland »

admin wrote: 03 Jan 2023 19:47Nope.
why ? is it too difficult to add or a limitation of VB ?

DO has it and it is quite useful :
Image-002.png
You do not have the required permissions to view the files attached to this post.

RalphM
Posts: 2086
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Group by "Type"

Post by RalphM »

Well, one can sort the list by extension if the column is shown.
The only thing missing are the group titles.
Ralph :)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

Horst
Posts: 1374
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Group by "Type"

Post by Horst »

Sorting by extension doesn't help much.
I classify .rtf, .pdf and .doc as documents for example and the sort can't sort them together.
In Total Commander I used a plugin which allows to define arbitrary file groups and their postion in the list.
But I stopped using this feature as in large lists the sorting order looks confusing.
Windows 11 Home, Version 25H2 (OS Build 26200.8457)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1412b (x64), Everything Toolbar 2.3.0, Listary Pro 6.3.6.99

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Group by "Type"

Post by highend »

Via a scripted custom column (define groups or use XYplorer's inbuilt ones and if an extension matches a group, return that group)...

Ofc no headers^^
One of my scripts helped you out? Please donate via Paypal

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Group by "Type"

Post by highend »

Required:
Configuration - General - Refresh, Icons, History - Scripting - [x] Remember permanent variables

E.g. this script would need to be run first (and atm only once):

Code: Select all

    perm $P_GFT_ARCHIVE = "<ARCHIVE><crlf>" . recase(formatlist(regexreplace(get("genericfiletype", "{:Archive}",    <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_AUDIO   = "<AUDIO><crlf>"   . recase(formatlist(regexreplace(get("genericfiletype", "{:Audio}",      <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_EXE     = "<EXE><crlf>"     . recase(formatlist(regexreplace(get("genericfiletype", "{:Executable}", <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_FONT    = "<FONT><crlf>"    . recase(formatlist(regexreplace(get("genericfiletype", "{:Font}",       <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_IMAGE   = "<IMAGE><crlf>"   . recase(formatlist(regexreplace(get("genericfiletype", "{:Image}",      <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_OFFICE  = "<OFFICE><crlf>"  . recase(formatlist(regexreplace(get("genericfiletype", "{:Office}",     <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_PHOTO   = "<PHOTO><crlf>"   . recase(formatlist(regexreplace(get("genericfiletype", "{:Photo}",      <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_TEXT    = "<TEXT><crlf>"    . recase(formatlist(regexreplace(get("genericfiletype", "{:Text}",       <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_VECTOR  = "<VECTOR><crlf>"  . recase(formatlist(regexreplace(get("genericfiletype", "{:Vector}",     <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_VIDEO   = "<VIDEO><crlf>"   . recase(formatlist(regexreplace(get("genericfiletype", "{:Video}",      <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_WEB     = "<WEB><crlf>"     . recase(formatlist(regexreplace(get("genericfiletype", "{:Web}",        <crlf>), "^\*\."), "s", <crlf>), "l");
    perm $P_GFT_MEDIA   = "<MEDIA><crlf>"   . recase(formatlist(regexreplace(get("genericfiletype", "{:Media}",      <crlf>), "^\*\."), "s", <crlf>), "l");
    writepv;
And the custom column script would then be:

Code: Select all

    // The permanent variables must have already been defined (different script!)
    if (<cc_ext> == "") { return "<NONE>"; }

    $gfts = "$P_GFT_ARCHIVE|$P_GFT_AUDIO|$P_GFT_EXE|$P_GFT_FONT|$P_GFT_IMAGE|$P_GFT_OFFICE|$P_GFT_PHOTO|$P_GFT_TEXT|$P_GFT_VECTOR|$P_GFT_VIDEO|$P_GFT_VIDEO|$P_GFT_MEDIA";

    foreach($gft, $gfts, "|") {
        $esc = regexreplace(<cc_ext>, "([\\^$.+()\[{])", "\$1");
        if (regexmatches($gft, $esc)) {
            return gettoken($gft, 1, <crlf>);
        }
    }
    return "<UNKNOWN>";
One of my scripts helped you out? Please donate via Paypal

Post Reply