How can I sort file displays by file type group (not file type)?

how can I sort file displays by file type group (not file type)?
For example when I'm in detail mode, when I sort column based on "Type"; jpg, png and webp don't sort close to each other. I want all image file types to be sorted together when I'm in detail mode. The same for music and movies file types.

I don't think there is such a column available. You'd need to create your own. Can be quick (eval) or thorough (script).

1 Like

image

This is an evaluator group, it can be modified to make an evaluator column or just copy and paste into evaluator groups
image

Extension FileType Groups
<?xml version="1.0"?>
<evalgroupscheme desc="Extension FileType Groups" reverse="no" scheme_name="extension_fileType_groups" sort="no">
	<eval>// 🞮🞉◆◉
groupName = &quot;🟣 Not in a FileType Group&quot;;
orderOut = 1000;

if (is_dir) {
  groupName = &quot;📁 Folders&quot;;
  orderOut = 10; }
elseif (Match(file_name, &quot;grp:Archives&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 Archives&quot;;
  orderOut = 20; }
elseif (Match(file_name, &quot;grp:Code&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 Code&quot;;
  orderOut = 30; }
elseif (Match(file_name, &quot;grp:Documents&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 Documents&quot;;
  orderOut = 40; }
elseif (Match(file_name, &quot;grp:Text&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 Text&quot;;
  orderOut = 45; }
elseif (Match(file_name, &quot;grp:Images&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 Images&quot;;
  orderOut = 50; }
elseif (Match(file_name, &quot;grp:Movies&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 Movies&quot;;
  orderOut = 60; }
elseif (Match(file_name, &quot;grp:Music&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 Music&quot;;
  orderOut = 70; }
elseif (Match(file_name, &quot;grp:Programs&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 Programs&quot;;
  orderOut = 80; }
elseif (Match(file_name, &quot;grp:eBooks&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 eBooks&quot;;
  orderOut = 90; }
elseif (Match(file_name, &quot;grp:Directory Opus&quot;, &quot;f&quot;)) {
  groupName = &quot;🢂 Directory Opus&quot;;
  orderOut = 100; }

//groupName = groupName as &quot;%O27&quot;;
groupName = groupName as &quot;%-30&quot;;

return [name = groupName; order = orderOut;];</eval>
	<groups enable="no" />
	<columns>
		<col default="no" id="0" />
		<col default="no" id="72" />
		<col default="no" id="13" />
	</columns>
</evalgroupscheme>
1 Like

if i add a new filetype (.pdf to Documents or .mkv to Movies) i need to exit Dopus to recognize a new file type group. is there a simpler way to update?


Hi Dear Leo
Thank you for your script. I have a few more Qs about "File Type Group" (not "Kind" which is not accurate)
1.Does DO export/import scripts when I export/import configurations?
2.Why DO doesn't implement some scripts like this which should have been implemented into the app without adding scripts. I think this feature should be built-in.
3.As you can see my screenshot, I think there are some faults in the script which should be addressed.
3.1.It didn't recognize some formats like txt and pdf which should be considered "Documents". I added manually.
3.2.Sorting should be like this: First by "File Type Group", Second by "Type" (Ext), Third by "Name".
As you can see from my screenshot, the second priority (Type, Ext) is not followed. One pdf is between docx format!
Png and jpg formats are between webp format!
3.3.If the above problems are resolved, all the files with the same Type (Ext) should be sorted by name, for example "Ubuntu.docx" should be after "Azadeh Anjamrouz Dentis.docx"

Kindly fix the script and send it again and as I mentioned these features obviously SHOULD be built-in into DO.

1 Like