Change display of file type descriptions?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
rich19
Posts: 6
Joined: 10 Dec 2025 08:41

Change display of file type descriptions?

Post by rich19 »

Is it possible the have the file type description in the list changed like the file associations and file icons can be changed. I don't want to change "open with" functions or anything else. There are utilities to do this but MSoft has made it nearly impossible to do it simply and cleanly (just try changing .bmp files to display "Bitmap Image" instead of "BMP File" - you can't). Or am I missing something?

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

Re: Change display of file type descriptions?

Post by highend »

Add your own scripted custom column

Code: Select all

$type = property("System.ItemTypeText", <cc_item>);
  if ($type LikeI "BMP File") {
    return "Bitmap Image";
  } elseif ($type LikeI "XLSX File") {
    return "Excel Document";
  }
  return $type;
or with a switch statement:

Code: Select all

$type = property("System.ItemTypeText", <cc_item>);
  switch ($type) {
    case "BMP File":
        $type = "Bitmap Image";
        break;
    case "XLSX File":
        $type = "Excel Document";
        break;
  }
  return $type;
2025-12-10_09-08-31.png
2025-12-10_09-08-31.png (139.58 KiB) Viewed 2404 times
One of my scripts helped you out? Please donate via Paypal

rich19
Posts: 6
Joined: 10 Dec 2025 08:41

Re: Change display of file type descriptions?

Post by rich19 »

I DID miss something! Thanks so much for the quick reply. I had not done my homework and investigated scripting in XYPlorer but I will remedy that today. The proposed solutions will work for me with a little work for the first implementaton and then I can use it anywhere. Much appreciated "highend". PS - XYPlorer is the greatest file manager and the only peice of software I've actually bought a lifetime license for. Freeware usually suffices.

rich19
Posts: 6
Joined: 10 Dec 2025 08:41

Re: Change display of file type descriptions?

Post by rich19 »

Slight problem. I followed your advice using the switch type setup. The problem is that I created an entry for all 500 or so registered extensions so I could fill in the desired description When I pasted that script into the XYPlorer Custom Column form, it stopped accepting text about 7/8s of the way through. The full script is about 1460 lines with 33,600 characters. I assume i've run into a limit. Maybe in the edit box on the custom column form and maybe some other restriction. I tried to find where the script was saved but it hides well. Not in the registry, not in any file in XYPlorer directory. I know 500 entries is a lot and the script is quite large but it works perfectly otherwise. Is there a solution somewhere? I'd really like even up to 1000 registered extensions if possible. Allocate more memory for scripts maybe?

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

Re: Change display of file type descriptions?

Post by highend »

It's in the XYplorer.ini file.
Make it shorter and really, stick to those which really need to be modified:

Code: Select all

$types = <<<>>>
BMP File|Bitmap Image
XLSX File|Excel Document
original entry|the one you want to display...
>>>;
    $type    = property("System.ItemTypeText", <cc_item>);
    $pattern = regexreplace($type, "([\\^$.+()\[{])", "\$1");
    $match   = regexmatches($types, "^" . $pattern . "\|.+?$");
    if ($match) { return gettoken($match, 2, "|"); }
    return $type;
One of my scripts helped you out? Please donate via Paypal

rich19
Posts: 6
Joined: 10 Dec 2025 08:41

Re: Change display of file type descriptions?

Post by rich19 »

"highend" I bow down before your superior ability! Many thanks again. I reduced script file from 30k to 20k just removing unneeded spaces. Your last script piece will reduce it even more. Also didn't realize that INI file latest version was highest number like -01, -02, etc. so I finally saw where script was stored and how. Total success for acheiving my aim once I had some pointers. I adapted it like this:
$ext = property("System.ItemType", <cc_item>); $type = property("System.ItemTypeText", <cc_item>); switch ($ext) { case ".386":$type = "Virtual Device Driver";break; case ".3fr":$type = "Hasselblad Digital Image";break;
and so on....this made it shorter some too. Now to adapt to your last suggestion - a little more homework I can figure out on my own.

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

Re: Change display of file type descriptions?

Post by admin »

Make it a little faster and shorter by using <cc_ext> which returns the extension faster and without the dot.

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

Re: Change display of file type descriptions?

Post by highend »

What Don means:

Code: Select all

$types = <<<>>>
386|Virtual Device Driver
3fr|Hasselblad Digital Image
>>>;
    $pattern = regexreplace(<cc_ext>, "([\\^$.+()\[{])", "\$1");
    $match   = regexmatches($types, "^" . $pattern . "\|.+?$");
    if ($match) { return gettoken($match, 2, "|"); }
    return property("System.ItemTypeText", <cc_item>);
One of my scripts helped you out? Please donate via Paypal

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

Re: Change display of file type descriptions?

Post by admin »

I rather meant this:

Code: Select all

switch (<cc_ext>) {
 case "386":$type = "Virtual Device Driver";break;
 case "3fr":$type = "Hasselblad Digital Image";break;
  ...

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

Re: Change display of file type descriptions?

Post by highend »

That will add up (doing it with switch) to quite a lot of unnecessary chars for the script. Use the heredoc version...
One of my scripts helped you out? Please donate via Paypal

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

Re: Change display of file type descriptions?

Post by admin »

Okay :tup:

sparks
Posts: 43
Joined: 06 Jan 2022 01:33
Location: Win11, ver 25H2, Dual 1920 x 1080 @100%

Re: Change display of file type descriptions?

Post by sparks »

Thanks for this. I used highend's last offered script, works fantastic. Clever stuff. :appl:

Post Reply