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 > Unlocking the Power of Smart Folders

Unlocking the Power of Smart Folders
Thread Tools
Grizzled Veteran
Join Date: Apr 2004
Location: Nagoya, Japan • 日本 名古屋市
Status: Offline
Reply With Quote
May 7, 2005, 07:55 PM
 
Smart folders were one of the reasons I bought Tiger, and it's been annoying me that I couldn't do as much with them as I wanted. For example, I create a lot of JPEG, PNG, and PDF files for clients, and they usually have the word "draft" or "preview" in them. I wanted a smart folder that would collect the newest ones in once place, but the smart folder GUI wasn't smart enough to allow "or" logic. (I couldn't specify a search for images or PDF documents.)

However, thanks to a hint at MacOSXHints.com, I've found you can put in a query of any complexity by choosing "Other Raw Query"; and after much experimenting and reading Apple's support documents, I figured out how to get what I want:

(kMDItemDisplayName == "*preview*"c || kMDItemDisplayName == "*draft*"c) && (kMDItemContentTypeTree == "com.adobe.pdf" || kMDItemContentTypeTree == "public.image") && (kMDItemFSContentChangeDate > $time.today(-28))

&& means "and", || means "or", and so on.

If you're constructing your own smart folder queries, you might find these documents helpful:
Spotlight Query Syntax
Uniform Type Identifiers (useful for knowing how Spotlight categorizes file types)
     
   
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:30 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