Search within file contents?

Have a suggestion for "Everything"? Please post it here.
Post Reply
Just Visiting
Posts: 26
Joined: Sat Jul 16, 2011 10:38 pm

Search within file contents?

Post by Just Visiting »

For example: inside Word documents, spreadsheets. text documents including CSV, PDF, and more.
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search within file contents?

Post by void »

To search file content, please try the content: search function.

For example, to search for the content "To be or not to be" in word documents, spreadsheets and text documents, modified this year, search for:
ext:docx;doc;xlsx;xls;txt;csv;pdf dm:thisyear content:"To be or not to be"

Note: File content is not indexed. Searching file content will be very slow.
For the best performance, combine the content: search with other search filters.

Please try the Advanced Search under the search menu and set the "A word or phrase in the file" field.
For the best performance, set as many fields in the Advanced Search as possible.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Search within file contents?

Post by harryray2 »

For speed, you're probably better off using a Grep programme, such as Dngrep or similar, which also searches within archive files.
horst.epp
Posts: 1445
Joined: Fri Apr 04, 2014 3:24 pm

Re: Search within file contents?

Post by horst.epp »

I miss the info that with version 1.5 content can be indexed
and therefore a fast search is possible.
Also the Everything query of the Windows index extends this.
For me its one of the best features of the new version.
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Search within file contents?

Post by ChrisGreaves »

harryray2 wrote: Sun Oct 02, 2022 6:40 amHi Harry,

For speed, you're probably better off using a Grep programme, such as Dngrep or similar, which also searches within archive files.
Speed of program execution, maybe; possibly even probably.
But for speed of results, Everything.exe will probably still be best, because :-

(1) Before the contents of a file can be searched, you must first catch your file! And Everything seems to be faster at file-finding by name and location than anything up to and including probes that smash asteroids.

(2) The search design, syntax etc of Everything.exe gives each one of us a head-start in devising a competent search string.

Granted, if this is my first time using a computer, anything will work. But If I am certain that my "pastry" recipe is within T:\Personal\ rather than within "T:\Corporate\", and that I developed the recipe in the past twelve months right here in "Bonavista" ... then Everything,exe will give me a head start.

In terms of Content searching, Everything is competent and reducing the 404,284 object on my data partition down to

Code: Select all

ext:docx;doc;xlsx;xls;txt;csv;pdf dm:thisyear content:"pastry"
a mere 21 objects, makes for a blindingly fast Contents search of close to half a million objects!

It can (and should) be argued that other content-finding utilities have excellent file-finding syntax too, but then to prove that even one of them is faster than Everything requires some sort of proper trial to make the point.

Cheers, Chris
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Search within file contents?

Post by NotNull »

ChrisGreaves wrote: Sun Oct 02, 2022 10:00 am 1) Before the contents of a file can be searched, you must first catch your file! And Everything seems to be faster at file-finding by name and location than anything up to and including probes that smash asteroids.
FWIW:
dnGrep can make use of Everything to find filenames quickly, although not as fast as Everything itself [1]



[1]
Fun fact: Everything is too fast for dnGrep :)
as I was testing I found that the dnGrep UI was freezing during the search, and then finally refreshing when the search was done. So many files were getting processed that the status bar updates could not keep up, freezing any screen updates. I had to throttle the updates to keep up with the file processing.
(https://github.com/dnGrep/dnGrep/pull/296)
MGadAllah
Posts: 7
Joined: Wed Mar 16, 2022 10:34 am

Re: Search within file contents?

Post by MGadAllah »

void wrote: Sun Oct 02, 2022 6:32 am For example, to search for the content "To be or not to be" in word documents, spreadsheets and text documents, modified this year, search for:
ext:docx;doc;xlsx;xls;txt;csv;pdf dm:thisyear content:"To be or not to be"
Hi,
Please correct me.
I've used this way, but nothing has shown in the result.
I've even tried to search for something I am sure that it does exist but still nothing is shown.
Sure I am doing something wrong.
I've just created a .txt file titled test voidtools.txt and added this line only:
voidtools forums
And saved and closed.
Then I added this to search bar:
ext:txt content:"voidtools forums"
But nothing showed.
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search within file contents?

Post by void »

Everything might be busy searching all txt files on your system?

Everything will show Querying... in the status bar when busy.

Please wait until Everything completes the search and the Querying status disappears.



Everything uses the system iFilter to search file content.
There might be something odd going on with your txt iFilter.

Please try the following search to avoid the iFilter and treat the file as UTF-8:

ext:txt utf8-content:"voidtools forums"

Does Everything find your file?
MGadAllah
Posts: 7
Joined: Wed Mar 16, 2022 10:34 am

Re: Search within file contents?

Post by MGadAllah »

void wrote: Tue Oct 31, 2023 11:14 am ext:txt utf8-content:"voidtools forums"
Does Everything find your file?
I am afraid not.
Please advise.
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search within file contents?

Post by void »

Please try combining utf8content: with more filters:

For example:

Copy the txt file to your desktop and search for:

\desktop ext:txt dm:thisyear

Does this show your txt file?

-If so, please try the following content search:
\desktop ext:txt dm:thisyear content:"voidtools forums"
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Search within file contents?

Post by NotNull »

Are you using Everything 1.5?

In Everything 1.5, when some files are content-indexed (Options > Indexes > Content), the content: function will be limited to the indexed ones.
In other words: If these txt files are not indexed and other files are, there will be no results.

To find content in these txt files in that case:

Code: Select all

\desktop   ext:txt   dm:thisyear   not-indexed:content:"voidtools forums"
MGadAllah
Posts: 7
Joined: Wed Mar 16, 2022 10:34 am

Re: Search within file contents?

Post by MGadAllah »

I will try your suggestions and feed you back.
NotNull wrote: Wed Nov 01, 2023 8:53 am Are you using Everything 1.5?
Everything 1.4.1.1024
Is it a beta version?
Please provide a link.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Search within file contents?

Post by NotNull »

From the voidtools home page, click In Development
2023-11-01 17_10_21-voidtools — Mozilla Firefox.png
2023-11-01 17_10_21-voidtools — Mozilla Firefox.png (40.51 KiB) Viewed 6799 times


Dedicated 1.5 subforum for questions and *lots* of info.
Post Reply