I would like to exclude certain file types for content searches, but include them for filename searches.
For example. I want to find files that are named cat
or have cat
in the contents, but I don't want to include any *.jpg
files that might also happen to cat
in the encoding by chance.
Let's say I have three files in a folder that are identical, except for their names. The file contains cat
in the contents:
cat.jpg image1.jpg image2.jpeg
Here's what I get trying various searches. All of them have include filename in contents option checked.
Search 1:
Containing text: cat
Results: cat.jpg image1.jpg image2.jpeg
Search 2:
File name: NOT:*.jpg
Containing text: cat
Results: image2.jpeg
Search 3:
File name: cat
Containing text: cat NOT:*.jpg
Results: none
Search 4:
File name: cat NOT:*.jpg
Containing text: cat
Results: none
Search 5:
File name: NOT:*.jpg cat
Containing text: cat
Results: cat.jpg image1.jpg image2.jpeg
What search can I do to get?
Results: cat.jpg image2.jpeg
cat.jpg is included because 'cat' is in the filename even though it's an excluded file extension, and image2.jpeg is included because 'cat' is in the contents and it's not an excluded file extension