|11-19-2007, 07:51 PM||#1|
Join Date: Jul 2005
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.
|11-20-2007, 05:16 PM||#2|
Join Date: Jan 2007
Path is one of those metadata elements explicitly unqueryable via a Spotlight search:
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
Availability: Available in Mac OS X v10.4 and later.
Spotlight Metadata Attributes Reference,
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.
|11-20-2007, 10:19 PM||#3|
Hall of Famer
Join Date: Apr 2002
Interestingly enough, the command-line equivalent -- mdfind -- *does* have a switch for that:
Limit the scope of the search to the directory specified.
So, specifying a path is as simple as:
mdfind -onlyin ~/Documents quibble
There must be some way to work that in the GUI.
Last edited by Hal Itosis; 11-20-2007 at 10:24 PM.
|Display Modes||Rate This Thread|