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

how do i get finder to search in a folder?

when i search in finder, it automatically searchinges "this mac" rather than the folder I had selected.


When I change the search in the top of the finder window to select the folder that I had open - by clicking on it - the search continues to find files anywhere on my mac.


I can tell its finding results from wierd and random places elsewhere on the system because if I select a file in the search results, it shows the path at the bottom and it has nothing to do with the folder I had selected.


is there a way - in finder - to search a folder and its sub folders for files containing the words I am searching for and not have it show results from the entire system?


if there is not a way in finder, what is the way I can search for files containing the text I am looking for using TERMINAL, where I believe things might behave logically?

Posted on Jul 2, 2021 3:19 AM

Reply
Question marked as Best reply

Posted on Jul 2, 2021 3:32 AM

That's weird. Select the folder instead of this mac is supposed to restrict the search.


As quick test, login to a new user account and see if the same problem is happening (I fully expect it will not happen).


If things work in another account, we will know that the problem is specific to your account.

I would start by deleting Finder preferences, then logging out and back in. This ought to fix it.


To delete Finder preferences, press Command-Shift-G and paste


~/Library/Preferences/com.apple.finder.plist


Drag the file out of the folder. You can put it in the trash, or park it on the desktop.

Then log out and back in.

10 replies
Question marked as Best reply

Jul 2, 2021 3:32 AM in response to Tim St.Clair

That's weird. Select the folder instead of this mac is supposed to restrict the search.


As quick test, login to a new user account and see if the same problem is happening (I fully expect it will not happen).


If things work in another account, we will know that the problem is specific to your account.

I would start by deleting Finder preferences, then logging out and back in. This ought to fix it.


To delete Finder preferences, press Command-Shift-G and paste


~/Library/Preferences/com.apple.finder.plist


Drag the file out of the folder. You can put it in the trash, or park it on the desktop.

Then log out and back in.

Jul 2, 2021 4:35 AM in response to Luis Sequeira1

With the Finder settings that I provided, I have a Finder window open on in a folder with the following hierarchy. I copy the five text files from the dir3 location to my Desktop. In the open Finder window of the Metadata directory, I enter the following search string in the Finder window:


name:c


This returns a window with 10 c*.txt files in the Metadata hierarchy, and none of the c*.txt files that I copied to the Desktop. Big Sur 11.4.


Tree:



Jul 3, 2021 4:48 AM in response to Tim St.Clair

Tim, without neglecting Luis's EtreCheck Pro suggestion, look in your ~/Library/Caches folder and see if there are com.apple.finder and com.apple.Spotlight folders in it. If so, drag these to the Desktop, log out, and sign back into your normal account. See if the current folder search issue is resolved.


Use the Additional text toolbar item below to post the copy/pasted Etrecheck report too.

Jul 3, 2021 1:41 AM in response to VikingOSX

Trashing the finder prefs (+logout) didn't change anything.


However, creating a new user and trying the same search did help. I switched back to my regular user and changed the finder search pref to "this folder" and tried the search again, the same problem - it finds files that I am searching for, and then brings in more results from outside the folder.


So the profile itself is at fault. I'll have to trash the profile and start over I think.

Jul 10, 2021 11:22 AM in response to VikingOSX

I have the same issue, but only for attached external hard disks. Files are found correctly over all internal and external storage using "This Mac." When I try to restrict the search to a desired folder on an attached HDD, search comes up with a blank.


Thanks to @Luis Sequeria1 and @VikingOSX I've deleted the 3 library files: ...plist, ...finder, and ...spotlight. Logged out, restarted my iMac, logged back in. No joy, same behavior throughout.


Odd, and wish I had an answer.

how do i get finder to search in a folder?

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