|
|||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
#1 | |||||||||||||||||||
|
Major Leaguer
Join Date: Jul 2005
Posts: 364
|
Manual Specify your search 'Path' using Spotlight Boolean query??
Does anyone know if its possible to manually enter in a Boolean query specifying the path of that you would like to search into spotlight (using Spotlight on Leopard)? Apple's help documentation offers the following suggestions, but nothing related to specifying the path of a search:
I ask because I am trying to use such a feature in conjunction with Microsoft Expression Media (former iView Media Pro), as seen here: ![]() I've tried strings such as the following, but have not had any luck as of yet... ![]() Any suggestions would be greatly appreciated... Thanks! Last edited by m021478; 11-19-2007 at 08:02 PM. |
|||||||||||||||||||
|
|
|
|
|
#2 |
|
MVP
Join Date: Jan 2007
Posts: 1,751
|
Path is one of those metadata elements explicitly unqueryable via a Spotlight search:
kMDItemPath Complete path to the file. This value of this attribute can be retrieved, but can't be used in a query or to sort search results. This attribute can’t be used as a member of the valueListAttrs array parameter for MDQueryCreate or MDQueryCreateSubset. Value Type: CFString Framework Path: CoreServices/CoreServices.h Header: MDItem.h Availability: Available in Mac OS X v10.4 and later. Spotlight Metadata Attributes Reference, http://developer.apple.com/documenta...Ref/index.html So I doubt that you can construct any Boolean string in Spotlight that will get you where you want to go. Would a Cmd-F Find specifying the path to target under "Others" (next to Servers / Computer / Home in Tiger's Cmd-F Find window) along with some Raw Query elements to specify kMDItemContentType and kMDItemContentCreationDate achieve the desired result? That's what I'd do in Tiger. (I don't know how Leopard may have changed things.) Something along the lines of a Raw Query of (kMDItemContentType = public.tiff) && (kMDItemContentCreationDate > $time.iso(20070201)) && (kMDItemContentCreationDate < $time.iso(20070514)) with "Others" pointing to the target directory. You could save the search to a SmartFolder, then extract the query string (Cmd-I on the SmartFolder will show it)--that <i>does</i> reference the path you've selected under "Others"--and try dropping it in Microsoft Expression Media search box. No idea if it will work. |
|
|
|
|
|
#3 | |||||||||||||||||||||||
|
Hall of Famer
Join Date: Apr 2002
Posts: 3,315
|
Interestingly enough, the command-line equivalent -- mdfind -- *does* have a switch for that: [-onlyin directory] Limit the scope of the search to the directory specified. So, specifying a path is as simple as: mdfind -onlyin ~/Documents quibble /Users/halito/Documents/TidBITS collection/TidBITS#884-18-Jun-07 There must be some way to work that in the GUI. -HI- Last edited by Hal Itosis; 11-20-2007 at 10:24 PM. |
|||||||||||||||||||||||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|