Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have excluded a folder from Spotlight, because this folder has a lot of files so it often fills up the results, no matter what I'm searching for.

However, sometimes I still want to search this folder. So, I tried opening the folder in Finder, then searching using the box in the top-right corner of the window, then selecting Search: "Folder_name" to limit the results to just that folder.

This method does not show any results, however. I assume it's because the folder is excluded from Spotlight search. So, is there any way that I can perform a manual search on the folder still, whenever necessary?

share|improve this question
    
I'm not quite familiar with Spotlight's inner workings, but I think it indexes the folder even if it is excluded, just doesn't show any results from it. So if you turned the exclusion off, maybe it works. If it doesn't, you can use mdimport on the Terminal to create an index, and may get rid of it after your search with another CLI tool. If you search for file names or content of text files only, there are also solutions involving the grep and find CLI utilities, or maybe even some GUI applications. –  Percival Ulysses Jul 20 '13 at 20:01
    
Are you trying to search by name/date or by content? –  patrix Jul 20 '13 at 20:14
    
Search by filename, that's usually all I need. –  Gary Jul 20 '13 at 21:18
    
Then you may want to use EasyFind, which also has an English interface, or use find/grep on the Terminal. –  Percival Ulysses Jul 20 '13 at 22:37

2 Answers 2

If you're happy with the terminal you can use the find command.

Something like opening Terminal in Utilities.

cd <folder name>
find . -name <whatever you're searching for>

Once found you can open it up with open

So, I can do something like:

alex@smiley:~|⇒  cd Desktop
alex@smiley:~/Desktop|⇒  find . -name Mac*
./Mac Pro.spx
alex@smiley:~/Desktop|⇒  open Mac\ Pro.spx

Notice that I used the * as a wildcard to match all files starting with Mac

share|improve this answer

Using terminal, you could use locate:

locate MY_FILE

Normally, the locate's database is update periodically (see man locate).

But you can run (if database is not up-to-date):

sudo /usr/libexec/locate.updatedb

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.