Properly quoting <file> for Quick Content Searches
Posted: 28 Sep 2016 18:34
I ran into an interesting scenario today where I'm trying to find files which contain another file's contents but are not duplicates.
For instance:
Match.txt contains "ABC/DEF"
Needle.txt contains "B"
Now, if I copy the contents into the Find Files > Contents tab I'm okay but I need to do this a couple dozen times and it sucks, so I thought I could use the quick search /contents switch combined with the <file> variable.
Thus I try:Success!
On to the next file: Needle-Bad.txt contains "C/D"
Those results don't look correct - in fact that's everything containing 'C'. Oh right '/' means I need quotes:Nothing... how can that be?
HELP! /?
Without quotes XY thinks it's a switch - with quotes and XY ignores <file...>.
What to do?

(For now I guess I'll manipulate a search template but that is so ugly!)
For instance:
Match.txt contains "ABC/DEF"
Needle.txt contains "B"
Now, if I copy the contents into the Find Files > Contents tab I'm okay but I need to do this a couple dozen times and it sucks, so I thought I could use the quick search /contents switch combined with the <file> variable.
Thus I try:
Code: Select all
?/contents=<file C:\Files\Needle.txt>On to the next file: Needle-Bad.txt contains "C/D"
Those results don't look correct - in fact that's everything containing 'C'. Oh right '/' means I need quotes:
Code: Select all
?/contents="<file C:\Files\Needle-Bad.txt>"HELP! /?
Code: Select all
Query: /contents="<file C:\Files\Needle-Bad.txt>" /?
Parsed: name:"*"
Search: Quick Search
Mode: Auto
FindBoolSmartDetect: Yes
ExtendedPatternMatching: Yes
MasterInvert: No
Tags DB Only: NoWithout quotes XY thinks it's a switch - with quotes and XY ignores <file...>.
What to do?
(For now I guess I'll manipulate a search template but that is so ugly!)