Want to do a complex Smart Folder in Tiger? It’s as easy as pi
So you want to create a Smart Folder that will show you only the items on your desktop that, say, contains all Microsoft Word files modified in the past 14 days with either a name that contains “22” or “23” but not “21”? Jason Snell over at Macworld thought you couldn’t. But you can.
If you don’t want to go there..
“1. Go to the finder, command-f
2. Click on the first drop down (probably labeled Kind)
3. Scroll or search for Raw Query
4. type in the box: (kMDItemDisplayName==’*22*’cd || kMDItemDisplayName==’*23*’cd) && kMDItemDisplayName!=’*21*’cd
5. Add the restriction of “Last Modified in the Last 2 Weeks” (or alternatively add the following to the Raw Query && (kMDItemFSContentChangeDate >= $time.today(-14))”
OK? Got that? As the commenter points out, you can grok this yourself:
You just need to make a sample query first using the smart folder/finder search UI to produce a saved search. Then do a Get Info on the saved search. In the General category of the Get Info window you will find the raw query. That query will use only And terms and only Equality searches. From there you can change any && to || or any == to != etc to get Or searches and not equal terms. In addition you need to know the the wild-cards. They are * and the cdw modifiers stand for case insensitive, diacritical insensitive and word comparison respectively.
I really don’t know if this is a triumph of getting under the code to find something really useful, or a big failure on the part of Smart Folders to make their interface properly useful. The latter, I’d suspect.
- These posts might be related (the database thinks..):
- Two things for Mac users: John Siracusa on Tiger; and DEVONagent (28 April 2005; score: 41.89%)
- Get it while it's late: my exclusive review of Tiger (you know.. that new software thing) (2 May 2005; score: 38.43%)
- Planning a Leopard upgrade? Here's how to make backups much easier: use /Shared (3 October 2007; score: 37.46%)




May 10th, 2005 at 12:13 am
Yeah, but it’s always tricky making things as simple as they can possibly be, without crossing the line into too simple.
It’d be interesting to see how the nested AND/OR/NOT problem has been solved in GUIs in the past.