Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Searching contents of text files

I write a lot of statistical programs that are saved simply as text files with a .do extension. It would be extremely useful if Spotlight would search the contents of these files for me but it doesn't. Is there a way to do this?

I note that I can search for text that I know is inside a Word document & Spotlight will find it. So, it's not as if Spotlight couldn't do this -- I just don't know how to make it happen.

Any ideas would be most appreciated.

Eric

PowerBook G4, Mac OS X (10.4.3)

Posted on Nov 21, 2005 11:09 AM

Reply
7 replies

Nov 21, 2005 1:40 PM in response to Eric Wruck

In order for Spotlight to index content there has to be an mdimporter for that type of file. Some files are really text files, but the extension isn't ".txt" so the mdimporter for text files ignores them. There is a hack that was reported at MacOSXHints for getting Spotlight to index php files. Be sure to read the whole thread before even considering trying it out. There are a lot of possible problems.

User uploaded file
Francine
Schwieder

Nov 21, 2005 2:31 PM in response to bdmarsha

Would this help with searching for phrases in regular word documents?

i find Spotlight to be sorely lacking in this regard, and as I am a writer, it is what I most need it for--I remember that I wrote "sorely lacking" in some piece, forgot what i saved the file as, or where, but want to fint the phrase. Spotlight does this very badly right now.

Any advice?

thanks

Nov 22, 2005 6:55 AM in response to Francine Schwieder

Thanks, everyone, for the suggestions. I also have files that have a .txt extension & Spotlight is able to find the content of those. I followed the instructions about dragging folders to the Privacy section of Spotlight preferences & then removing it but that didn't seem to make any difference but maybe I didn't do it right. This mdimporter idea makes sense. I think Spotlight will continue to ignore the contents of my .do files until it will recognize them. What are php files?

Thanks,

Eric

Nov 23, 2005 9:34 AM in response to Eric Wruck

I could rename them but that would be something of a
pain -- although I could save the backup copies with
the .txt extension, Spotlight would find it, & I
would know the name of the .do counterpart.



That might/should work as a temporary measure.
I think I will write Stata about doing that
mdimporter -- does that require
cooperation/coordination with Apple?


It could be done without apple, maybe. But I'd recommend
they do it with Apple if they have that level of
support. I'm curious to see what happens to spotlight.
Thanks,

Eric

Searching contents of text files

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