Changing Filters from an external app

General discussion related to "Everything".
Post Reply
vip_shadow
Posts: 23
Joined: Fri May 07, 2010 1:28 am

Changing Filters from an external app

Post by vip_shadow »

It's a strange request. Yes, I know. But I prefer to ask it anyway. But maybe there's a way.

I'm funning the following code in an external app to do a search with everything.

Code: Select all

Shell EverythinPath & "Everything.exe -s" & " " & """" & SearchThis & """", 1
This opens Everything and search for whatever SearchThis variable contains.

When I run the above code, is it possible to use one of the filters pre-defined in everything?
For example I have a filter to search only for cad files. Is it possible to change the search filter in everything and run the above code?
At present, after the search is done, User has to change the filter manually.


Note:
I know that I can add the filter to search query like the following. For some specific reasons, I don't want to use this method. I prefer to change the selected filter in Everything if possible.

Code: Select all

ext="ext:sldprt;slddrw;dxf;sldasm;pdf;tif;tiff;sldprt;slddrw;dxf;sldasm;"
Shell EverythinPath & "Everything.exe -s" & " " & """" & SearchThis & ext & """", 1
Thanks for any kind of advice.
void
Developer
Posts: 17149
Joined: Fri Oct 16, 2009 11:31 pm

Re: Changing Filters from an external app

Post by void »

Please try the -filter <filter-name> command line option.

For example:
Shell EverythinPath & "Everything.exe -filter ""audio"" -s" & " " & """" & SearchThis & """", 1


Shell EverythinPath & "Everything.exe -filter ""video"" -s" & " " & """" & SearchThis & """", 1


-filter



Alternatively, please try filter macros:

Shell EverythinPath & "Everything.exe -s" & " " & """audio: " & SearchThis & """", 1


Shell EverythinPath & "Everything.exe -s" & " " & """video: " & SearchThis & """", 1
vip_shadow
Posts: 23
Joined: Fri May 07, 2010 1:28 am

Re: Changing Filters from an external app

Post by vip_shadow »

@void Million thanks.
Problem solved.
Post Reply