Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Smart folders - OR functionality?

Smart folders - OR functionality?
Thread Tools
Mac Enthusiast
Join Date: Jul 2001
Status: Offline
Reply With Quote
Apr 29, 2005, 10:43 AM
 
$10 to the first person who figures this out...

How do I get an 'or' criteria in a smart folder? All I can figure out is by adding additional criteria, they default to 'and'. It'd be awesome if I could make a folder that... searched for all items within folder x, that were created within the last week, that were of kind a or b or c. That would be so good for my workflow. Any ideas of workarounds?
     
Forum Regular
Join Date: Dec 2001
Location: Ft Laud, FL USA
Status: Offline
Reply With Quote
Apr 29, 2005, 11:33 AM
 
I don't have Tiger yet but based on this info: http://arstechnica.com/reviews/os/macosx-10.4.ars/9
Spotlight's user interface doesn't allow "OR" conditions. Thus it seems Smart Folders are not so "smart" after all

I'll email you my address so you can send out $10
     
ntt
Fresh-Faced Recruit
Join Date: Jul 2003
Location: Seattle, WA
Status: Offline
Reply With Quote
Apr 29, 2005, 12:11 PM
 
There may be a method of hacking the smartfolder file using a text editor or similar.
I'm waiting to pick up Tiger tonight then I'll see what can be hacked.
http://bestbits.ii.net/ for widgets and more
     
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Apr 29, 2005, 01:45 PM
 
Here's an example:
Suppose you want to find all files in your "Downloads" folder that are created within the last week, of kind either "text" or "PDF."

So first make your saved search, specifying "Kind: PDF", "Created: This week". Save it, say with the name "Recent Text or PDF"

1. Go to ~/Library/Saved Searches/
2. Drag your "Recent Text or PDF.savedSearch" file onto the text editor of your choice.
3. On lines 7-8 (or so), you'll find
Code:
<key>RawQuery</key> <string>(kMDItemContentTypeTree = 'com.adobe.pdf') &amp;&amp; (kMDItemFSCreationDate &gt;= $time.today(-7)) &amp;&amp; (kMDItemContentType != com.apple.mail.emlx) &amp;&amp; (kMDItemContentType != public.vcard)</string>
4. Now we'll edit that query to include text as well as PDFs:
Code:
<key>RawQuery</key> <string>(kMDItemContentTypeTree = 'com.adobe.pdf' || kMDItemContentTypeTree = 'public.text') &amp;&amp; (kMDItemFSCreationDate &gt;= $time.today(-7)) &amp;&amp; (kMDItemContentType != com.apple.mail.emlx) &amp;&amp; (kMDItemContentType != public.vcard)</string>
5. Save the file.
6. No step six!
Actually, you might have to make a copy of the file, or rename or move it, to get the Finder to refresh its cache.

I'll accept an iTunes certificate, thanks. (J/K)
     
Hornet  (op)
Mac Enthusiast
Join Date: Jul 2001
Status: Offline
Reply With Quote
Apr 29, 2005, 08:48 PM
 
Ahh fantastic! Good to see it can be done. Maybe the spotlight UI will add it sometime Cheers mate!
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Apr 29, 2005, 09:16 PM
 
Or you could just add a "Raw Query" criteria and type it in there...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:22 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2