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.

In earlier versions of OSX, when you search in a Finder window, it gave you the choice of searching by contents or file name. In Lion this choice seems to have disappeared, I can only search by content now. Is there any way to search by name in Lion?

share|improve this question

5 Answers 5

up vote 10 down vote accepted
  1. Open a finder window
  2. Open the folder you wish to search in
  3. Click in the search box
  4. Type the text you want to find
  5. A dropdown should appear like the one in the image below which allows you to select the 'Filename contains' option

Finder window

If you've already run the search and want to alter the search to only look for files with your search term in the filename, you can click the '+' button just beneath the search box and change the search type from there. See screenshots below:

Finder window 2

Finder window 3

Mike Scott has nice suggestions from the comments that are worth incorporating here to use the name: selector in spotlight.

You can prefix your search with name: as shown below
Finder window 4

This results in a window which you can select 'Filename' or 'Everything' from if you click the button labelled 'name' in the search box as shown below:
Finder window 5

share|improve this answer
    
Oh thanks. I'd noticed the drop down out of the corner of my eye when I did a search, but I never looked closely at it because I figured it was just the same old useless suggestions list you always got. It's still not as good as the old way though because it disappears when you finish searching - is there any way to get it back without starting the search all over again? I often want to switch to file name search after seeing the results of a content search. –  Ross Smith Jul 24 '11 at 12:20
6  
Or just prefix your search term with "name:". –  Mike Scott Jul 24 '11 at 12:51
1  
@Mike Scott: best real-answer-buried-in-a-comment ever. Looks like "filename:" is needed to limit searches just to filenames -- with "name:" the file I'm looking for still gets buried among e-mail message items, etc. –  Miles Erickson Aug 6 '11 at 15:59

It does not disappear - just enter your query into the searchfield and hit enter - then click into it again and find the possibility to switch right there.

share|improve this answer

Ross is correct that the option to switch between searching filenames or contents disappears once you perform your search -- if you don't choose filenames to search filenames from the drop-down when you first type in the search term. Once you perform the search without having clicked on that drop-down, the drop-down will not appear even if you click again in the search bar. You have to type another character in the search bar, then delete it, and THEN the drop down appears.

This is pretty stupid on Apple's part. They took something that was simple, very clear and self-explanatory, and made it hard to find, a bit difficult, less useful and inconsistent. If you want to search contents first and then switch to filenames, it's not as easy as the simple click of a visible button. No logical reason for this. I hope they return the original, better-designed feature.

share|improve this answer
1  
Do you really think Apple made this change by mistake or without considering it would force people to change their thinking? I'd say they weighed it carefully and the overwhelming benefit to some was worth pissing off some people. I'd say that's more likely than them being stupid, but we're all allowed our speculation on the issue. –  bmike May 30 '12 at 23:42

Search using the name: selector

name:index.html in spotlight

I've also become a big fan of the Found app. It's currently free on the app store and lightning fast (seems faster than LaunchBar to me - and that's saying a lot as it's a speed demon).

share|improve this answer

⌃⌘F (File > Find by Name…) also opens a Spotlight window that is set to search by name by default.

share|improve this answer
    
As far as I can tell, this opens a window that searches the Desktop folder. Is that the right keyboard shortcut? –  daviesgeek May 31 '12 at 16:34
1  
@daviesgeek It searches in the current folder if you've set that as the default in Finder's preferences. –  Lri Jun 1 '12 at 13:47
    
Oh. I get it now :-) –  daviesgeek Jun 1 '12 at 15:08

protected by Ian C. May 27 at 23:02

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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