What is the correct grammar of "filelist"?

General discussion related to "Everything".
Post Reply
linkun
Posts: 1
Joined: Sun Jul 11, 2021 12:20 pm

What is the correct grammar of "filelist"?

Post by linkun »

I want to search 3 files at one via "filelist:Alice|Bob|Chocolate", But I can only search the Non-First items out. What is the correct grammar of "filelist"?
Please find the demos in the pictures.
right.png
right.png (4.13 KiB) Viewed 6067 times
wrong.png
wrong.png (3.85 KiB) Viewed 6067 times
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: What is the correct grammar of "filelist"?

Post by void »

filelist: syntax:

filelist:"filename1.txt|filename2.txt|filename3.txt"
filelist:"c:\temp\filename1.txt|c:\temp\filename2.txt|c:\temp\filename3.txt"

Notes:
The whole filename is matched.
If the filename includes a path separator (\) or (/), the whole path and filename is matched.
Use double quotes to escape the | separator. ( | is treated as the OR operator without the double quotes)

Please try the following search:

path:temp\ filelist:"Alice.txt|Bob.txt|Chocolate.txt"
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: What is the correct grammar of "filelist"?

Post by therube »

(Since this wasn't clear to me...)

Note in the screenshot, that ".txt" is not highlighted, so what is being found are strings of text rather then the 'whole filename', which is what filelist: is looking for.

Also note the, "(without the double quotes | is treated as the OR operator)", & that is why in the second screenshot that bob & chocolate turn up (& not alice).

The search said to look for 'filelist:alice' (which does not exist - as it is "alice.txt") OR bob or chocolate - which do exist, but as written, are not included as part of the filelist: list (even if it might appear that they are).
Post Reply