Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Search for multiple Spotlight comments System 10.4
Tiger only hintNormally when you perform a Finder search for files that have Spotlight comments, you're limited to searching for a single phrase or word or comment. You can't search for multiple comments from within the same search field, nor can you add additional search fields, because then Finder thinks you're seeking all of the variables at once. However, with the Raw Query, you can easily search for multiple Spotlight comments with the following string:
(kMDItemFinderComment = "*text*")
The * characters placed before and after the word force the search to look for that word, but not limit itself by any other text around it (without the asterisks, the query becomes absolute for just that text and nothing else). For example, if you have one type of Spotlight comment that is Mac OS X Hints and another that is Unix Hints, then you can use the following string to find files possessing both types:
(kMDItemFinderComment = "*Hints*") 
If you want to find all files with Hints comments, but also limit to them comments offset by the word Rob (i.e. Mac OS X Hints by Rob as opposed to Mac OS X Hints by Wolverine), then you can write it as follows in the same search field:
(kMDItemFinderComment = "*Hints*") && (kMDItemFinderComment = "*Rob*")
The double && characters mean "AND" in this case. You can also use || to mean "OR", such as:
(kMDItemFinderComment = "*Hints*") || (kMDItemFinderComment = "*hints*")
That search will find all comments that contain either the words "Hints" or "hints". This picture shows a sample smart search using these constructs.

Finally, you don't need to limit yourself to the Raw Query strings that you know -- you can easily find out what strings are available on a given file by going into the Terminal, finding the file, then typing mdls filename.ext or mdls "File Name.ext". Here's an example.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[9,002 views]  

10.4: Search for multiple Spotlight comments | 2 comments | Create New Account
Click here to return to the '10.4: Search for multiple Spotlight comments' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Search for multiple Spotlight comments
Authored by: stealthrocket on Jun 03, '05 12:46:40PM

I'm not slamming your hint but this just shows Apple has some work to do on Spotlight. Searching like this is just to difficult - for most people.



[ Reply to This | # ]
404 links
Authored by: dzurn on Sep 21, '05 10:51:27AM

404 pages not found for example in original hint...

---
Madness takes its toll.
Please have exact change.



[ Reply to This | # ]