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

How to search for words in documents in Lion

Here's why I'm trying to ask.

Lately I have downloaded a lot of files from Google Drive, and I'm trying to sort a lot of documents (262 exactly) by finding a set of numbers and letters that only one kind of document has.

For example, I'm trying to find the documents that have "5R-ET1" to see which documents has those set of letters inside the documents to sort them in a diffrent folder.

Is there something in the Finder that can allow me to do this, or is there like this program which compares documents that fits my use?

By the way, most of the files are in .doc format, the rest are in .pages format.

Hope there is a way to fix this situation! 🙂🙂

MacBook Pro, Mac OS X (10.7.4)

Posted on Jun 16, 2012 10:01 PM

Reply
Question marked as Best reply

Posted on Jun 16, 2012 10:18 PM

Spotlight will index file contents,which should make this pretty easy, especially since they're standard file formats.


Just use System Preferences -> Spotlight to ensure that indexing is enabled on those file types, then use the Spotlight menu item (the mangifying glass at the right-hand end of your menubar) to enter the search term.


If you want to restrict the search to a particular folder, just open that folder in the Finder and hit Cmd-F - this will display the search criteria options, where you can choose to search Contents (via the first popup menu).

4 replies
Question marked as Best reply

Jun 16, 2012 10:18 PM in response to Horace from seoul

Spotlight will index file contents,which should make this pretty easy, especially since they're standard file formats.


Just use System Preferences -> Spotlight to ensure that indexing is enabled on those file types, then use the Spotlight menu item (the mangifying glass at the right-hand end of your menubar) to enter the search term.


If you want to restrict the search to a particular folder, just open that folder in the Finder and hit Cmd-F - this will display the search criteria options, where you can choose to search Contents (via the first popup menu).

Jun 16, 2012 11:44 PM in response to Horace from seoul

Open to correction here but I don't think Spotlight will do this for you, particulary if these are long documents. Spotlight does not index then entire document, just the first 2k approx unique terms within a document. If the string you're looking for isn't within that limit then it won't work.


Options:


1. You could import the documents to an app like DevonThink Pro or Circus Ponies Notebook that have a concordance feature.


2. You could convert the files to Text and search them with BBEdit or the grep command.


http://hints.macworld.com/article.php?story=20001105214242629

Jun 16, 2012 11:52 PM in response to Horace from seoul

Use TextWrangler. It was built for this kind of job.


http://www.barebones.com/products/TextWrangler/benefits.html



Example:

Your company merges with another and now you have to go through thousands of text documents and change every occurrence of MegaCorp to Exegis International. TextWrangler’s multi-file search and replace makes short work of the job.

How to search for words in documents in Lion

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