Can content and a normal file search be performed together in one operation?

Discussion related to "Everything" 1.5.
Post Reply
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Can content and a normal file search be performed together in one operation?

Post by Biff »

Can content (showing files that contain all words in the search field / default Google search) and a normal file search be performed together in one operation?
tuska
Posts: 1382
Joined: Thu Jul 13, 2017 9:14 am

Re: Can content and a normal file search be performed together in one operation?

Post by tuska »

Yes.

Examples

Code: Select all

Path\ content:<Searchword|Searchword|Searchword|Searchword> | <File name>
Path\ ext:doc;docx;jpg content:<Searchword|Searchword|Searchword|Searchword> | <File name (.JPG)>
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Re: Can content and a normal file search be performed together in one operation?

Post by Biff »

Many thanks!

Can content and a normal file search be performed together in one operation with the same search terms for both the content and file search? So one would add the same search terms once and they would be searched in the file name and the content (it then would find files that contain one or more search terms in the content and / or in the file name)? What would be the best way to make a bookmark of such a search?

Could one use a space instead of a pipe (in the examples)?
tuska
Posts: 1382
Joined: Thu Jul 13, 2017 9:14 am

Re: Can content and a normal file search be performed together in one operation?

Post by tuska »

Biff wrote: Thu Jan 23, 2025 2:46 pm Can content and a normal file search be performed together in one operation with the same search terms for both the content and file search?
So one would add the same search terms once and they would be searched in the file name and the content
(it then would find files that contain one or more search terms in the content and / or in the file name)?
Yes.

If the word you are looking for is present in both the file content and the file name, only the file name is displayed.
In the search result, it is NOT possible to determine from the file name alone whether the file content (with the same name)
is also present in this file. This means that a manual check may be necessary.
Biff wrote: Thu Jan 23, 2025 2:46 pm What would be the best way to make a bookmark of such a search?
Apart from shortening the text from content: to mc: (=mycontent) - macro: mc<mytext>, I can't think of any setting at the moment,
with which a speed advantage could be achieved here. Perhaps someone else knows a solution...
Biff wrote: Thu Jan 23, 2025 2:46 pm Could one use a space instead of a pipe (in the examples)?
This depends on which search result the search query is aimed at (AND/OR).
You can test this yourself with your search terms - please see: Menu "Help" > Search Syntax > Operators... AND/OR (example).

The best thing to do is to try out a few search queries yourself.
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Re: Can content and a normal file search be performed together in one operation?

Post by Biff »

Thank you very much!

So this in the search field
 content:<92347234 ksdfkjjsdfklj weriouwer >
finds txts / files with this content
92347234 ksdfkjjsdfklj weriouwer

It does not find files with this content:
92347234 ksdfkjjsdfklj
And with this:
92347234

So this in the search field
 content:<92347234 |ksdfkjjsdfklj| weriouwer >
finds txts / files with this content
92347234
So the spaces (here: <92347234 |ksdfkjjsdfklj| weriouwer >) obviously does not matter.

Is this how it should be?

Sorry, I still do not understand how to achieve that: Can content and a normal file search be performed together in one operation with the same search terms for both the content and file search?
So one would add the same search terms once and they would be searched in the file name and the content
(it then would find files that contain one or more search terms in the content and / or in the file name)?

E.g. I am searching for files containing all of these phrases in their contents or / and in their file names: 92347234 ksdfkjjsdfklj weriouwer
For content only this search:
 content:<92347234 ksdfkjjsdfklj weriouwer >
And for content and file names? What did I have to insert?
tuska
Posts: 1382
Joined: Thu Jul 13, 2017 9:14 am

Re: Can content and a normal file search be performed together in one operation?

Post by tuska »

2Biff
Below you will find sample solutions.
I hope this answers all your questions.

Code: Select all

File	............................	Content
------------------------------------------------------------------------
a.txt	............................	92347234
b.txt	............................	ksdfkjjsdfklj
c.txt	............................	weriouwer
Phrases.txt ........................	92347234 ksdfkjjsdfklj weriouwer
92347234 ksdfkjjsdfklj weriouwer.txt	92347234 ksdfkjjsdfklj weriouwer
2025-01-24_Content searching_1 of 2.png
2025-01-24_Content searching_1 of 2.png (93.16 KiB) Viewed 2394 times
 
2025-01-24_Content & File searching_2 of 2.png
2025-01-24_Content & File searching_2 of 2.png (57.28 KiB) Viewed 2394 times
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Re: Can content and a normal file search be performed together in one operation?

Post by Biff »

That's great, very useful, thank you very much!

This also seems to be a confirmation of my examples, I suspect.

But, very sorry, I still do not understand how to do that, obviously I somehow misses the answer (where can I find it in your last post?): E.g. I am searching for files containing all of these phrases in their contents or / and in their file names: 92347234 ksdfkjjsdfklj weriouwer

So this works: content:<92347234 ksdfkjjsdfklj weriouwer >
But how can I find with the same search 92347234 ksdfkjjsdfklj weriouwer also in the file names?

Thank you very much again!
tuska
Posts: 1382
Joined: Thu Jul 13, 2017 9:14 am

Re: Can content and a normal file search be performed together in one operation?

Post by tuska »

Biff wrote: Fri Jan 24, 2025 9:13 am So this works: content:<92347234 ksdfkjjsdfklj weriouwer >
But how can I find with the same search 92347234 ksdfkjjsdfklj weriouwer also in the file names?
Here are a few more variations in addition to the first example in the image ‘2025-01-24_Content & File searching_2 of 2.png’
above your last post. The search for files was underlined in red there.

| OR ... Space AND

Code: Select all

ext:txt content:<92347234|ksdfkjjsdfklj|weriouwer> | <92347234 ksdfkjjsdfklj weriouwer>
| OR

Code: Select all

ext:txt content:<92347234|ksdfkjjsdfklj|weriouwer> | <92347234 | ksdfkjjsdfklj | weriouwer>
Space AND

Code: Select all

ext:txt content:<92347234 ksdfkjjsdfklj weriouwer> | <92347234 ksdfkjjsdfklj weriouwer>
This concludes my tests in this regard.
________________
Operators AND, OR --> Operator precedence: OR > AND is the default.
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Re: Can content and a normal file search be performed together in one operation?

Post by Biff »

Ah, some more examples, great, many thanks! Very useful!
Post Reply