Is there a command to search content?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
TheOtherLad
Posts: 13
Joined: Fri Mar 05, 2021 9:48 pm

Is there a command to search content?

Post by TheOtherLad »

Hey,
Is there a command line option like -content to search the content of a file?

thanks
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there a command to search content?

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 docx files, modified this year, search for:
ext:docx 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.
TheOtherLad
Posts: 13
Joined: Fri Mar 05, 2021 9:48 pm

Re: Is there a command to search content?

Post by TheOtherLad »

thank u! :D
TheOtherLad
Posts: 13
Joined: Fri Mar 05, 2021 9:48 pm

Re: Is there a command to search content?

Post by TheOtherLad »

umm is there a way to search for certain text and check if there's a filename or content match?
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there a command to search content?

Post by void »

Please try the following search:

"my search" | <dm:thisyear ext:docx;pdf content:"my search">

where my search is your text you wish to find in the filename or content.
Please make sure you use double quotes to escape spaces.
| = OR
< > = Grouping

This will find files that contain my search in the filename, or if the file was modified this year, is a docx or pdf file and contains the text my search.

Note: content: is really really slow, combine with other search filters for the best performance.

If you find the above useful, consider creating a macro:
  • In Everything, from the Search menu, click Add to filters
  • Change the Name to:
    Filename or content
  • Change the Search to:
    search: | <dm:thisyear ext:docx;pdf content:search:>
  • Change the Macro to:
    foc<search>
  • Click OK.
Now, when you search for foc:"my search" it is replaced with "my search" | <dm:thisyear ext:docx;pdf content:"my search">
Post Reply