Author Topic: how to add filetype column  (Read 11511 times)

ncnnnn

  • Junior Member
  • **
  • Posts: 31
    • View Profile
how to add filetype column
« on: June 20, 2024, 04:22:34 »
The program can now display the extension column, but cannot find the file type column.
The program has already obtained the icon for the file, so it should also be able to obtain the file type.

I hope to display the corresponding type column like explorer  . thanks
« Last Edit: June 20, 2024, 14:31:51 by ncnnnn »

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 556
  • Old Skull
    • View Profile
Re: how to add filetyoe column
« Reply #1 on: June 20, 2024, 10:11:42 »
If I get you right, you may try the following script:

Code: [Select]
@var $type_name;

if ( IsFolder($_FILEPROP_FILEPATH) == 0 )
{
  @var $ext = PathGetFileExtPart($_FILEPROP_FILEPATH);
  $type_name = RegValueGetSZ("HKCR", $ext, "");
}
else
{
  $type_name = "Directory";
}

@var $_COLUMN_TYPE_DESCRIPTION = RegValueGetSZ("HKCR", $type_name, "");

Create scriptable column and add $_COLUMN_TYPE_DESCRIPTION as the Output variable.

But for unknown extension it will return empty string. I think in such cases Windows [Explorer] constructs description itself in the form "EXT File". And it depends on the OS locale. I'm not sure it's possible (or there's an easy way) to get it from OS.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4492
    • View Profile
    • Multi Commander
Re: how to add filetyoe column
« Reply #2 on: June 20, 2024, 10:49:29 »
The program can now display the extension column, but cannot find the file type column.
The program has already obtained the icon for the file, so it should also be able to obtain the file type.

I hope to display the corresponding type column like explorer  . thanks

Never been a request for actually showing that.. But I think it is easy to add.. See if I get time to add it to 14.1

ncnnnn

  • Junior Member
  • **
  • Posts: 31
    • View Profile
Re: how to add filetyoe column
« Reply #3 on: June 20, 2024, 14:21:40 »
thank your script 👍。but I donot know how to add it.
 
But I think it doesn't have a cache and can only be queried during runtime, which takes a lot of time

if ($type_name ==""){
$_COLUMN_TYPE_DESCRIPTION =$ext+" File"
}

If I get you right, you may try the following script:

Code: [Select]
@var $type_name;

if ( IsFolder($_FILEPROP_FILEPATH) == 0 )
{
  @var $ext = PathGetFileExtPart($_FILEPROP_FILEPATH);
  $type_name = RegValueGetSZ("HKCR", $ext, "");
}
else
{
  $type_name = "Directory";
}

@var $_COLUMN_TYPE_DESCRIPTION = RegValueGetSZ("HKCR", $type_name, "");

Create scriptable column and add $_COLUMN_TYPE_DESCRIPTION as the Output variable.

But for unknown extension it will return empty string. I think in such cases Windows [Explorer] constructs description itself in the form "EXT File". And it depends on the OS locale. I'm not sure it's possible (or there's an easy way) to get it from OS.
« Last Edit: June 20, 2024, 14:36:37 by ncnnnn »

ncnnnn

  • Junior Member
  • **
  • Posts: 31
    • View Profile
Re: how to add filetyoe column
« Reply #4 on: June 20, 2024, 14:31:16 »
thanks! Looking forward to version 4.1 software  👍

”Never been a request for actually showing that..“

I hope to switch seamlessly between using Explorer on someone else's computer and using Multicommand on my own computer
I like multicommand with multiple tabs, each tab has an independent folder tree,and Make full use of the widescreen left and right panel  :)
Similar software also has FreeCommander, but it seems to use . net to implement some functions and has a slower response
thank you! :)

ps: I don't know if it's a bug

“Configuuration"-->"Extension/plug-in manager"--> "explorer panel"
webpage show: http:\\www.multicommander.
not http://

and click http:\\www.multicommander.com,  msedge show "Forbidden"

The program can now display the extension column, but cannot find the file type column.
The program has already obtained the icon for the file, so it should also be able to obtain the file type.

I hope to display the corresponding type column like explorer  . thanks

Never been a request for actually showing that.. But I think it is easy to add.. See if I get time to add it to 14.1

« Last Edit: June 20, 2024, 14:50:43 by ncnnnn »

ncnnnn

  • Junior Member
  • **
  • Posts: 31
    • View Profile
Re: how to add filetype column
« Reply #5 on: June 24, 2024, 04:28:35 »
thanks! 👍