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

Change default search criteria in Finder

I have had trouble finding things in Finder (10.12) recently.


I have discovered why.


When I select "show search criteria" it seems that it has defaulted to Kind is Other "com.microsoft."


How do I rectify this; and ideally change it to default to showing system files too rather than hand selecting each time? I am assuming a plist somewhere needs an edit.


Many thanks.


JKB

MacBook Pro (15-inch, Late 2016), macOS Sierra (10.12.4)

Posted on May 5, 2017 8:53 AM

Reply
24 replies

May 5, 2017 11:16 AM in response to Justin Kirk-Bayley

Are you talking about the results of a Spotlight search?


All you need to do is click on the Other box and change from Other to select Any or whatever category (any, application, archive, document executables, folder, image, movie, music, pdf, presentation, or text) you wish like this:


User uploaded file


When you select a different category than Other, the box that shows the "com.microsoft" in the example above will disappear. Some of the choices will show an additional list box in order to specify more control over what is displayed. For example if you choose Image you get another list box that will have choices for JPEG, TIFF, GIF, PNG and BMP. Play around with the type box to see what other choices it will allow you to make.


Good luck...

May 6, 2017 6:10 AM in response to Justin Kirk-Bayley

You can't change the default Search Criteria without hacking the OS. However, you can create a Smart Folder or Folders in the Finder and set you search criteria as needed. Save the Smart Folder to Saved Searches in your User Library (by clicking the Save Button to the right side in the Finder window) and it should appear in the Finder sidebar under Favorites. You can create different searches for different purposes if needed.

May 6, 2017 6:14 AM in response to Glenn Leblanc

It would seem that a Microsoft installer has hacked my OS. I am happy to change a default setting on the System or Library folder. Does anyone know which file needs editing though?

Searching the Library or System folders for a file whose contents contain "com.microsoft." (selecting for system files) yields nothing.

I need a nudge in the right direction!

May 6, 2017 6:29 AM in response to Justin Kirk-Bayley

I doubt that anyone will be able to tell you how to change that default setting of the OS. Even if they would, it will not yield any different results that the Smart Search Folder will revel.


If you feel you have been hacked, you might post a question on that subject and explain your details on why you feel that way. Many people are knowledgable on this and will be happy to help.

May 6, 2017 6:45 AM in response to Glenn Leblanc

Not sure I like that term hacked per se. I suspect it's (hopefully more of an 'installer glitch'). It is odd though. And irritatingly unrectifiable.

Delighted to have a level reply about it from you though. For some reason my 'rating' has reset here (although I admittedly haven't posted for ages as I hadn't had any issues) and so it looks like I am a newbie so everyone assumes I have no idea what I am doing! Potentially fair!


It is an odd issue though. How enough it came to be I have no real idea. Clearly a plist somewhere or equivalent has been edited and I am left having to manually edit every time I do a Finder search.


Any other ideas most welcome!

May 6, 2017 7:03 AM in response to Justin Kirk-Bayley

OK, I see. It should be defaulting to "Kind" is "Any", not "Other". I understand your problem now.

If I had to take a guess, it would be the com.apple.finder.plist file, but not 100% sure. The path to that folder/file is:

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

If you wish to try, move that file and any other com.apple.finder.*** files in the Preferences folder of your user library to the trash, but do not empty. Restart the computer and test. Your finder will be set back to defaults. If it doesn't work, select the files in the trash and right click and choose put back, or manually drag them back to the preferences folder to replace the new ones and restart the computer.


If you wish to verify that the problem is with a corrupt file in your user folder before doing anything else, create a new user account to test with. Log into that user account and see if the Finder search criteria is correct. If yes, then it is definitely a file within your user account.

If it remains incorrect in the new user account, then there is a problem in the main OS itself and the above advise will not help. You may have to reinstall the OS to correct it if someone else can't tell you how to correct it.

May 6, 2017 8:00 AM in response to Justin Kirk-Bayley

Not sure if this is worth a try but the following are files/folders that I've found that have something to do with storing Finder data, you could back them up, then delete them and restart your machine to see if Finder then Resets.


~/Library/Caches/com.apple.finder

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

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

~/Library/Saved Application State/com.apple.finder.savedState

~/Library/Saved Searches


There might be others but haven't found them on my system yet.


ps looks like Glenn go there before me.

Oct 23, 2017 8:43 AM in response to Justin Kirk-Bayley

I'm certain there's a plist somewhere that has this information, but haven't found it so far.


There are certain underlying settings that can be changed in Terminal using the 'defaults' command. A very common 'finder'-related usage, for example, is to permanently show all hidden files (like CMD-SHIFT-dot but stays that way) with the Terminal command:


defaults write com.apple.Finder AppleShowAllFiles true


This tells 'defaults' to write to the preferences related to a domain called 'com.apple.Finder'. It looks for a key called 'AppleShowAllFiles' and sets it to 'true'. ('YES' is shown in some examples. It means the same thing.)


Note: if you're going to use this command, make sure to follow it with the command 'killall Finder'. This re-launches Finder to make the change take effect.


I'm sure that someone at Microsoft has figured out which `defaults` item(s) must be added or changed to set that `kind` value. However, I've not been able to find it so far, and it seems not to be publicly documented anywhere.


Side comment: this isn't a hack at all. It's an advanced feature of the OS that is used by many apps and super users. Whoever caused this at Microsoft may not even realize they were affecting all of Finder with the command they used - or they might have done it on purpose, but did it with full intent of making your Microsoft stuff easier to find.


Either way, if I find an answer before this post expires, I'll definitely post it!

Oct 25, 2017 4:56 AM in response to Redarm

By the way, if you want to look at "Recents" in High Sierra, which has replaced "All My Files", you will find the saved search (with a raw query this time) at this path (put it into the Finder's "Go > Go to Folder..." menu, as the path will show different names in Finder itself - "Recents.cannedSearch" and won't allow opening the packet file with a simple right click):

/System/Library/CoreServices/Finder.app/Contents/Resources/MyLibraries/myDocuments.cannedSearch/Resources/search.savedSearch


The raw query string, again including Microsoft files, found in the saved search:

(kMDItemLastUsedDate = "*") && ((kMDItemContentTypeTree = public.content) || (kMDItemContentTypeTree = "com.microsoft.*"cdw) || (kMDItemContentTypeTree = public.archive))

Change default search criteria in Finder

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