excluding certain file type from spotlight search

Hi,

I would like to exclude certain files types from spotlight, say all files with extension .abcdef. How do I do that?

Gernot

Powerbook 12

Posted on Sep 25, 2006 2:16 AM

Reply
8 replies
Sort By: 

Sep 25, 2006 3:16 PM in response to Gernot Maier

I believe the only way to reliably do this is to do a Command-F search and in the criteria select Other... and from that list select Raw Query. If you are doing a file name search, but want to exclude certain extensions it would look something like this:

((kMDItemFSName == " OldTestament") && (kMDItemFSName != " txt"))

Using this I get an html document and a folder. If I just use OldTestament as the file name I get those plus some text documents.

After you set-up your RawQuery you can save it and reuse it, just altering the search term and the excluded bit.
Francine

User uploaded file
Francine
Schwieder
Reply

Sep 26, 2006 4:47 AM in response to Gernot Maier

Hmm, I see asked to wrong question.

The right questions is:

How do I prevent spotlight from indexing a certain type of files?

I have large data files, which are completly useless for spotlight. Still while copy them into the system, spotlight takes its time to index it.

Gernot
Reply

Oct 5, 2006 7:56 PM in response to Gernot Maier

You can restrict the results Spotlights shows you by going into the System Preferences. In there there is a Spotlight Pane. Just choose what you want to include in your results. You can see and read more at http://www.learntomac.com and I actually have a posting I put describing how to do this and more at http://www.learntomac.com/index.php/2006/10/04/spotlight-preferences/

I hope this helps!
Dan
Reply

Nov 22, 2006 9:08 PM in response to Gernot Maier

I can't figure how to make Spotlight do what you ask. I can't make it do what I want it to do either, but that's another story.

I've been looking at third-party alternatives/additions to Spotlight. Haven't found one which does everything, but I think HoudahSpot might do what you're looking for. It seems to handle things that are not something pretty well.

Might be worth a look, there's a free trial download. Registered copy is $14.95.

http://www.houdah.com

Powerbook G4 12" Mac OS X (10.4.8) 1.5 GHz, 1.25Gb ram
Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

excluding certain file type from spotlight search

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.