Search filter to search for a content
Search filter to search for a content
Can I make a filter that searches inside the files(ahk)which are located in a specific folder so when I select that filter,it will automatically display all of the ahk files in that folder and when i start typing,it will do a content search in that folder only on the ahk files
Re: Search filter to search for a content
With limitations, but possible.
Create a filter with
With that, and the ahktext filter enabled, you can search for to find all ahk files in c:\some folder that contain that specific text string.
The limitation: you can specify just one search string. will not find the quick brown fox jumps over the lazy dog.
There might be better ways, but I can't think of any at the moment.
Create a filter with
Code: Select all
Name = ahktext
Search = "c:\some folder" ext:ahk utf8content:"QUERY:
Macro = <QUERY>
the quick brown fox
The limitation: you can specify just one search string.
the quick brown fox dog
There might be better ways, but I can't think of any at the moment.
Re: Search filter to search for a content
Sorry for the late reply but either I am not doing it properly or it does not work
1.Create a new filter with a name AHK
2.On "Search" I type "my ahk folder" ext:ahk utf8content:
3.Hit ok
4.Switch to that AHK filter and type ffmpeg
Everything shows only one file and that file is the only file named ffmpeg
It also does not work if I set a macro and use it while the active filter is "Everything"
If I switch to the Everything filter that shows everything and type "my ahk folder" ext:ahk utf8content:ffmpeg,I get 6 results
Even if I set for search in the filter ext:ahk content:,it will still act as if I am searching for file names,not content
And if I create a bookmark and set a macro and use the macro for my search,it will also act as if I am searching for file names
Maybe a bug or non implemented feature(content search file using a filter or a macro that contains that content searching function)
To put it simply
ext:ahk content: in a filter don't do content searching
ext:ahk content: in a filter with macro and use the macro,same
ext:ahk content: in a bookmark with a macro and use the macro,same
Search normally by typing ext:ahk content:ffmpeg,displays all files that contains that word
1.Create a new filter with a name AHK
2.On "Search" I type "my ahk folder" ext:ahk utf8content:
3.Hit ok
4.Switch to that AHK filter and type ffmpeg
Everything shows only one file and that file is the only file named ffmpeg
It also does not work if I set a macro and use it while the active filter is "Everything"
If I switch to the Everything filter that shows everything and type "my ahk folder" ext:ahk utf8content:ffmpeg,I get 6 results
Even if I set for search in the filter ext:ahk content:,it will still act as if I am searching for file names,not content
And if I create a bookmark and set a macro and use the macro for my search,it will also act as if I am searching for file names
Maybe a bug or non implemented feature(content search file using a filter or a macro that contains that content searching function)
To put it simply
ext:ahk content: in a filter don't do content searching
ext:ahk content: in a filter with macro and use the macro,same
ext:ahk content: in a bookmark with a macro and use the macro,same
Search normally by typing ext:ahk content:ffmpeg,displays all files that contains that word
Re: Search filter to search for a content
Try it with:
(replace "my ahk folder" with the actual folder. Leave the rest as-is)
Enable the AHK filter and search for:
Code: Select all
Name = AHK
Search = "my ahk folder" ext:ahk utf8content:"QUERY:
Macro = <QUERY>
Enable the AHK filter and search for:
ffmpeg
Re: Search filter to search for a content
I did not add that macro the last time because I didn't think it was needed
Why does adding the macro makes it work?
Isn't the macro just a shortcut to make Everything use the search criteria when you type it?
And why do I need just one quotas
It works now,thanks
Why does adding the macro makes it work?
Isn't the macro just a shortcut to make Everything use the search criteria when you type it?
And why do I need just one quotas
It works now,thanks
Re: Search filter to search for a content
Everything needs the QUERY in both places so it understands that QUERY is a variable that will be replaced with what you type, not some literal text to search for.vsub wrote: ↑Sun May 16, 2021 7:04 pm I did not add that macro the last time because I didn't think it was needed
Why does adding the macro makes it work?
Isn't the macro just a shortcut to make Everything use the search criteria when you type it?
And why do I need just one quotas
It works now,thanks
(BTW: QUERY is chosen at random; you could replace "QUERY" with for example "something" or "%1" to get the same effect).
Typically you would define the macro as ahk<QUERY>, so that you could also search for
ahk:ffmpeg
The " is needed for search strings that contain more than one word. Default, a space breaks the content: search and will see the spcae as an AND operator, causing whatever you type after that space to match filenames again.
You can see the effect of the " when you do a normal - Everything filter enabled, no search options - search for
program fi
"program fi
Because Everything is search-as-you-type, Everything will assume the closing " will come later and implicitly puts it at after the last character you typed. At least, that is my theory; havn't seen the source code
Re: Search filter to search for a content
Ok thanks for the info
Re: Search filter to search for a content
@NotNull
and then in the search line of Everything:
If yes, it doesn't work...
While this:
does work fine
Running the latest v1.5 alpha...
So something like this should work (while "Menu - Search - Everything" is still checked)?Typically you would define the macro as ahk<QUERY>, so that you could also search for
ahk:ffmpeg
, without the need to enable the filter. But as you don't need that, I left it out.
Code: Select all
Name: AutoHotkey
Search: "D:\AutoHotkey" ext:ahk content:"QUERY:
Macro: ahk<QUERY>
ahk:copydata
If yes, it doesn't work...
While this:
"D:\AutoHotkey" ext:ahk content:copydata
does work fine
Running the latest v1.5 alpha...
Re: Search filter to search for a content
Unfortunately, the answer to that question is No.
Behind the scenes, in Everything's engine room that search is translated to
Code: Select all
nofiltercase:nofilterpath:nofilterwholeword:nofilterdiacritics:nofilterprefix:nofiltersuffix:nofilterignorepunctuation:nofilterignorewhitespace:nofilterregex:< "c:\develop" ext:ahk content:"copydata >
When you want to use ahk:copydata, you need a different approach:
Code: Select all
Name: AutoHotkey
Search: "D:\AutoHotkey" ext:ahk content:QUERY:
Macro: ahk<QUERY>
Where the first solution can search for a string containing multiple words, this solution searches for strings containing a single word (=no space character).
So now you can use: ahk:copydata
When you want to search for a string containing a space or a |, enclose the string in quotes, like: ahk:"copydata, A_PtrSize"
Re: Search filter to search for a content
Thanks, NotNull!
That works as expected
That works as expected