Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Hack to search multiple folders' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Hack to search multiple folders
Authored by: Aikinai on Apr 08, '08 06:22:53AM

I figured out a hack to solve this problem and I just submitted a hint but I imagine it will be awhile before it shows up, so here's a copy for anyone who needs a solution soon:

In 10.5 Leopard, there is no way to do a smart search on multiple locations (and even searching one specific location is a pain). I've search everywhere and found no real solutions, but I've discovered it does work if you manually edit a previous saved search in a text editor. This is obviously no good for quick searches, but if you want to use a saved search as a smart folder, this method will work.

First make a search with the other criteria you want (date, filetype, etc), but any location and save it. Then go to /Users/Username/Library/Saved Searches/ and you will see the search you just made. I'm not sure what other text editors you can use, but I used Smultron and it worked great. I dragged the search to Smultron on the dock and it opened it as a text file. There are many keys where it lists the location of the search so I did a find and replace to change them all.

For example you might find:


		<array>
			<string>/Users/Username/Documents</string>
		</array>

and replace with:


		<array>
			<string>/Users/Username/Documents</string>
			<string>/Users/Username/Pictures</string>
			<string>/Users/Username/Music</string>
		</array>

Now, just save the file and when you click on the saved search, it will search all the locations.

This is obviously not the best way to do this, but it will work until Apple realizes we might still want to search based on folders.



[ Reply to This | # ]
Re: Hack to search multiple folders
Authored by: ammacdon on Oct 30, '08 12:50:01PM

thanks Aikinai! that worked perfectly. i used it to search two specific folders on an external drive, so i set the CurrentFolderPath array to just the enclosing folder, and set SearchScopes and FXScopeArrayOfPaths arrays to the folders inside.



[ Reply to This | # ]
Re: Hack to search multiple folders
Authored by: ammacdon on Dec 12, '08 01:01:09PM
also, i forgot to note that the smart folder text file doesn't like escaped paths, e.g.: the kind you get when you drag a file in the terminal:

Bad:

		<key>SearchScopes</key>
		<array>
			<string>/Volumes/external\ hard\ drive/myfolder</string>
		</array>


Good:

		<key>SearchScopes</key>
		<array>
			<string>/Volumes/external hard drive/myfolder</string>
		</array>


[ Reply to This | # ]
Hack to search multiple folders
Authored by: CharlesB52 on Sep 22, '11 02:33:31AM
Great tip, it still works in Lion. Key name to edit is now

		<key>FXScopeArrayOfPaths</key>
		<array>
			<string>/Volumes/DD/Documents</string>
			<string>/Users/charles2/Documents</string>
		</array>


[ Reply to This | # ]