To search inside file content the search syntax is:
content:<text>
The issue is that when the input text has spaces it needs escaped quotation marks when passed to Everything as quotes are stripped and spaces are treated as a new funcion.
From the command line
Code: Select all
Everything64.exe "C:\Scripts" -s content:"hello world"
Code: Select all
C:\Scripts content:hello world
Code: Select all
""" to escape a literal "
Code: Select all
Everything64.exe "C:\Scripts" -s content:""""hello world""""
Code: Select all
C:\Scripts content:"hello world"
Code: Select all
Invoke-Expression "& `"$pathToEverything.exe`" `"$searchPath`" -s content:`"$searchTerm`""