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

Search files in current folder doesn't work

When I search my whole mac for e.g. "Danse Macabre" i get the results from all over the place, which is to be expected.

User uploaded file

So when I go into the folder I get a list of files including the one I was searching for. So far so good.


User uploaded file

While typing in a new search inside that current folder, the file list refreshes and still shows me all files in that folder, even though the search string isn' part of most of the names:

User uploaded file

When I actually specify to only look at the actual file names, the list shows only the file including the actual string. Unintuitive but acceptable. Just pressing the enter key will still show the whole unfiltered directory.

User uploaded file

However - and that is my real grip - when I want to find specific files, e.g. all files containing the string "cab" then this happens:

User uploaded file

User uploaded file

User uploaded file


The list empties the moment I type in the third letter, which doesn't make any more sense than showing all files when typing in the first letter. And when I actually commit the search which should show me all files containing "cab" in the name, I got nothing.

This makes the search feature in finder completely useless.

What's going on?

And how do I fix it?

MacBook 5,1, Mac OS X (10.7.1)

Posted on Mar 11, 2012 8:55 AM

Reply
Question marked as Best reply

Posted on Mar 11, 2012 11:15 AM

I played around with this a little.


Although typing into the folder search field gives you an option labeled "Filename contains…", what you really seem to get is a search for "Filename contains a 'word' that begins with…."


A new "word" in the filename can be the beginning of the filename, anything that comes after a punctuation character, or a case change. The matching criteria itself ignores the case.


So in your example, you had a file named "01 Danse macabre.mp3", and a filename search for "cab" didn't find it. I think that is because "cab" is in the middle of the string, and is not a "word" as defined above. As an exercise, I renamed one of my own files as "01 Danse macabre.mp3", and as expected, searching for the filename "cab" didn't find it. However if I then capitalized the "C" so that the filename was "01 Danse maCabre.mp3" then a search for "cab" did find it:

.

User uploaded file

.

.

"Cab" starts a new "word" because of the case change. The search itself is case-insensitive, so that searching for "cab" finds "Cab".


This shows the problem, but doesn't fix it. As a work-around, instead of using the top-right search field to type in "cab", instead hit command-F to bring up the search window. Change the initial "Kind is Any" line to "Name contains". Now you get a true "contains" search instead of a "word begins with" search. When I searched for "cab" this this way, I did find "01 Danse macabre.mp3":

.

User uploaded file

7 replies
Question marked as Best reply

Mar 11, 2012 11:15 AM in response to arotto

I played around with this a little.


Although typing into the folder search field gives you an option labeled "Filename contains…", what you really seem to get is a search for "Filename contains a 'word' that begins with…."


A new "word" in the filename can be the beginning of the filename, anything that comes after a punctuation character, or a case change. The matching criteria itself ignores the case.


So in your example, you had a file named "01 Danse macabre.mp3", and a filename search for "cab" didn't find it. I think that is because "cab" is in the middle of the string, and is not a "word" as defined above. As an exercise, I renamed one of my own files as "01 Danse macabre.mp3", and as expected, searching for the filename "cab" didn't find it. However if I then capitalized the "C" so that the filename was "01 Danse maCabre.mp3" then a search for "cab" did find it:

.

User uploaded file

.

.

"Cab" starts a new "word" because of the case change. The search itself is case-insensitive, so that searching for "cab" finds "Cab".


This shows the problem, but doesn't fix it. As a work-around, instead of using the top-right search field to type in "cab", instead hit command-F to bring up the search window. Change the initial "Kind is Any" line to "Name contains". Now you get a true "contains" search instead of a "word begins with" search. When I searched for "cab" this this way, I did find "01 Danse macabre.mp3":

.

User uploaded file

Mar 11, 2012 11:33 AM in response to jsd2

Yeah, thanks, the word vs part-of-a-word part is one of the most messed default settings apple ever had.

And even worse, your solution doesn't even work in many cases if e.g. the localized name doesn't coincide with the actual filename.

You have to go into the cmd-f menu, open the search type filelist, select other to bring up a menu that enables you to actually ALLOW you to search for filenames !!!


User uploaded fileUser uploaded file


I unchecked everything so filename (Dateiname) stays as default search type.

And of course you can't set the default search type to "string" instead of "word".


After doing that the search function is at least halfway usable.

You are completely ****** however if you want to find something on a 500GB external harddrive...

Oct 25, 2012 7:59 PM in response to arotto

I have been experinceing similar behavior but it has always been eradict. Some directories seem to work fine others do not. I did note that if a directory did not work I coudl hit CMD-F and choose "filename" from the criteria and that would work fine. In addtion if I switched from the current folder to my "MAC" it finds the files. When it works or I choose my "MAC" if finds any pattern in the name that I type.


I played around a little more and made some changes and uiltimately fixed the problem by first making sure that I was owener but do not belive that was the issue and I found some ACLs on the files and remvoed them. Still no luck even after running mduilt -E /. Lastly I found that if I renmaed the dir and renamed it back again it is fixed.

Oct 25, 2012 9:59 PM in response to MikeApex

It gets weirder.


In one folder I have the file "Householdbudget".


If I search for "hous" finder finds it both in "This Mac" and the current folder view.

If I search for "budg" finder finds it again.

If I search for "udge" - nothing.


I think the quicksearch only indexes words found in a dictionary instead of whole strings.


I guess that happens if you suck at efficient search algorithms and don't want to ask experts like google.


btw. I'm using OSX 10.8.2 by now. No improvement.

Oct 26, 2012 2:17 PM in response to arotto

Well I think the logic here is to limit the number of hits in spotlight. Remmber this all has to be indexed and the more hits the more garabage to sort through. By defautl it is indexing and searching name and contents. It would be nice if the name option from the drop down that allows name/everyhting serached for any characters but that is not somehting you would want in a File Contents search. I am guessgn that the implmentation since it starts searchign wihtout you make the choice initally is what is limiting the results. I think Apple is choosign "matches" to apply to known words and "contains" for any Fuxxy wildcard search string


This one is easliy solved by hitting CMD-F and choosing name and contains instead of matches. I think this is reasonable for hwo many times you woudl actually search for "udge" when you mena "budge". Just my 2 cents.

Search files in current folder doesn't work

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