How can i make certain file types show up first in search results?

If you are experiencing problems with "Everything", post here for assistance.
paulo312
Posts: 1
Joined: Tue Mar 29, 2022 3:28 pm

How can i make certain file types show up first in search results?

Post by paulo312 »

I want .exe to show up first, then everything else, how can i do this?
meteorquake
Posts: 631
Joined: Thu Dec 15, 2016 9:44 pm

Re: How can i make certain file types show up first in search results?

Post by meteorquake »

I supposed this can be generalised by being able to specify specific extensions as having a sort-as value, for example if png were given a sort as value of "jpg" it would extension-order-sort to be intermingled with the jpg files, or if jpgp would sort after them. avi might likewise be given the code mp4 to fall with them. For exe to be at the front I suppose in this scenario it could be give the code 0 or something at the start of the alphabet...
d
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: How can i make certain file types show up first in search results?

Post by raccoon »

sort:type
void
Developer
Posts: 20041
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can i make certain file types show up first in search results?

Post by void »

Consider using the Run Count property and sorting by Run Count:
  • In Everything, type in the following search:
    *.exe
  • Select all files (Ctrl + A)
  • From the File menu, click Set Run Count....
  • Change Run Count to a high number (eg: 1000)
  • Click OK.
  • Right click the result list column header and check Run Count.
  • Click the Run Count column header to sort by run count.
I will consider a 'rank' sort that can be customized.
Thank you for the suggestion.
void
Developer
Posts: 20041
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can i make certain file types show up first in search results?

Post by void »

Everything 1.5a has the following search:

regex:\.(exe)$ | nohighlight:regex:.* sort:regmatch1-descending;name-ascending

To create a filter to sort by exe first:
  • In Everything 1.5, from the Search menu, click Add to Filters....
  • Change the Name to:
    EXE First
  • Change the Search to:
    regex:\.(exe)$ | nohighlight:regex:.* sort:regmatch1-descending;name-ascending
  • Click OK.
Filters can be activated from the Search menu, Filter bar (View -> Filters), right clicking the status bar, filter macro or filter keyboard shortcut.
TheCrusty
Posts: 4
Joined: Wed Jun 15, 2022 6:06 pm

Re: How can i make certain file types show up first in search results?

Post by TheCrusty »

Can we adjust this Regex to a sequence of parameters like

regex:\.(exe docx xlsx *)$ | nohighlight:regex:.* sort:regmatch1-descending;date-descending

or something like that?
TheCrusty
Posts: 4
Joined: Wed Jun 15, 2022 6:06 pm

Re: How can i make certain file types show up first in search results?

Post by TheCrusty »

This regex can be adjusted to be possible to order a sequence of extesions? like


regex:\.(exe docx xlsx *)$ | nohighlight:regex:.* sort:regmatch1-descending;date-descending

I'm using the operators sequence OR > AND
void
Developer
Posts: 20041
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can i make certain file types show up first in search results?

Post by void »

Please try:

Code: Select all

file:regex:\.(exe|docx|xlsx)$ | nohighlight:regex:.* sort:regmatch1-descending;date-descending
However, this sorts by extension.
I'll look into adding a way to mix the extensions.
iamqz
Posts: 36
Joined: Wed Oct 05, 2022 2:34 pm

Re: How can i make certain file types show up first in search results?

Post by iamqz »

void wrote: Thu Jul 21, 2022 7:52 am Please try:

Code: Select all

file:regex:\.(exe|docx|xlsx)$ | nohighlight:regex:.* sort:regmatch1-descending;date-descending
However, this sorts by extension.
I'll look into adding a way to mix the extensions.

does everything have support multiple ext sort as of now?
void
Developer
Posts: 20041
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can i make certain file types show up first in search results?

Post by void »

does everything have support multiple ext sort as of now?
Could you please clarify what you mean by multiple ext sort?
Do you mean...


I'll look into adding a way to mix the extensions.
This can be done now with formulas:

Code: Select all

file: a:=REGEXMATCH($extension:,"^(exe|docx|xlsx)$")  sort:a-descending;date-descending
iamqz
Posts: 36
Joined: Wed Oct 05, 2022 2:34 pm

Re: How can i make certain file types show up first in search results?

Post by iamqz »

void wrote: Fri Jul 03, 2026 2:55 am
does everything have support multiple ext sort as of now?
Could you please clarify what you mean by multiple ext sort?
Do you mean...


I'll look into adding a way to mix the extensions.
This can be done now with formulas:

Code: Select all

file: a:=REGEXMATCH($extension:,"^(exe|docx|xlsx)$")  sort:a-descending;date-descending
i want search results to show certain file types first, for example, exe first then lnk then txt then other
i try your code but not work
PixPin_2026-07-03_11-24-08.png
You do not have the required permissions to view the files attached to this post.
void
Developer
Posts: 20041
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can i make certain file types show up first in search results?

Post by void »

The REGEXMATCH search will mix extensions. (txt is treated the same as exe)

If you want to list exe first, then lnk, please use:

Code: Select all

file: <<*.exe a:=1> | <*.lnk a:=2> | <*.txt a:=3> | <*.docx a:=4> | <*.xlsx a:=5> | a:=6> sort:a;date-descending
iamqz
Posts: 36
Joined: Wed Oct 05, 2022 2:34 pm

Re: How can i make certain file types show up first in search results?

Post by iamqz »

void wrote: Fri Jul 03, 2026 3:30 am The REGEXMATCH search will mix extensions. (txt is treated the same as exe)

If you want to list exe first, then lnk, please use:

Code: Select all

file: <<*.exe a:=1> | <*.lnk a:=2> | <*.txt a:=3> | <*.docx a:=4> | <*.xlsx a:=5> | a:=6> sort:a;date-descending
it works! thank you very much! 💕
by the way, i have another two question:
if i apply a filter: <*.exe a:=1> | <*.lnk a:=2> | <*.txt a:=3> | <*.docx a:=4> | <*.xlsx a:=5> | a:=6> sort:a
i cannot apply sort:date-descending in search input box,
it mean ev does not support "sort:a sort:b" ?

question2: can multiple filters be applied simultaneously?
thanks!
void
Developer
Posts: 20041
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can i make certain file types show up first in search results?

Post by void »

i cannot apply sort:date-descending in search input box,
it mean ev does not support "sort:a sort:b" ?
Only one sort can be specified.

sort:a sort:b


sort:b will override sort:a.

However, you can specified multiple sorts in a single sort: call
For example:
sort:a;date-modified-descending

This will sort by a first, if a has the same value, Everything will then sort by date modified.

sort:


question2: can multiple filters be applied simultaneously?
Yes, with filter macros.

For example:
audio: | video:


-or-

By using Ctrl to toggle filters from the Search menu or filter sidebar.
iamqz
Posts: 36
Joined: Wed Oct 05, 2022 2:34 pm

Re: How can i make certain file types show up first in search results?

Post by iamqz »

void wrote: Fri Jul 03, 2026 5:37 am
i cannot apply sort:date-descending in search input box,
it mean ev does not support "sort:a sort:b" ?
Only one sort can be specified.

sort:a sort:b


sort:b will override sort:a.

However, you can specified multiple sorts in a single sort: call
For example:
sort:a;date-modified-descending

This will sort by a first, if a has the same value, Everything will then sort by date modified.

sort:


question2: can multiple filters be applied simultaneously?
Yes, with filter macros.

For example:
audio: | video:


-or-

By using Ctrl to toggle filters from the Search menu or filter sidebar.
it works! thanks very much!
Regarding macro,i have a quesion:
is there gui (like 'Organize filters' window) to manage the macros that are created by /define command ?
I can not find them in menu Search > Organize filters .
void
Developer
Posts: 20041
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can i make certain file types show up first in search results?

Post by void »

There's no UI for /define macros.

I might add a UI in a future update.

For now, to list all /define macros, type in the following search and press ENTER:
/define


To see the definition for a macro, type in the following search and press ENTER:
/define macro-name


For example:
/define foo


/define



Alternatively, exit Everything (File -> Exit) and edit your Macros.csv
iamqz
Posts: 36
Joined: Wed Oct 05, 2022 2:34 pm

Re: How can i make certain file types show up first in search results?

Post by iamqz »

void wrote: Fri Jul 03, 2026 7:08 am There's no UI for /define macros.

I might add a UI in a future update.
great! thanks!