If you use the Find function in the Finder you can perform file searches that are much more complex than using Spotlight. You can add many pieces of criteria to the search other than a single search term. If you know how, you can use logic to combine search criteria and add very specific options. Then you can save your searches so you don't have to recreate them from scratch later.
You can also watch this video at YouTube.
Watch more videos about related subjects: Finder (317 videos).
You can also watch this video at YouTube.
Watch more videos about related subjects: Finder (317 videos).
Video Transcript
Hi, this is Gary with MacMost.com. Let me show you how to perform complex file searches on your Mac.
MacMost is brought to you thanks to a great group of supporters. Go to MacMost.com/patreon where you can read more about it, join us, and get exclusive content.
Probably the quickest way to search you Mac is to use Command Space to bring up Spotlight and use a Spotlight search. But this is going to bring up lots of things that aren't files. You're going to see webpages, emails, all sorts of stuff. If you want to just see files then your best bet is to start in the Finder. So with any Finder window open and you've got this Search box here. You can start typing in that and that will just search for files. If you use Command F though, which is File Find, then it instantly switches into this searching mode which has a few more options.
The first thing you want to pay attention to is make sure you're searching in the right area. You always have the current location wherever it was that this window was pointing at before you hit Command F, in this case the Documents folder. Make sure you know this is where you want to search. If you want to search up in the user folder lever start there. If you want to search down inside of a specific folder start there. You're only going to get files that are in here. If you select This Mac you're going to search your entire computer and you usually don't want to do that because that means it's going to search system files, library files, all sorts of things where you know the file that you created is not going to be located.
So start at the proper location. Then you still have this field up here. This is where you can type your search terms. So you can type a file name or part of a file name. For instance I can start typing test but what I'm going to get are a lot of documents that have the word test in the title but some documents that don't. They have test in the content. But notice over here I get this little option to limit the search to only documents that have the word inside the name.
Now I can further refine the search here. I've got this search criteria area and it just has one item in it right now. That is Kind is Any. In other words anything. But this allows me to refine this. So I can say Kind is just give me Text documents. Now I've refined it like that. You can refine it anyway you want. I can do Presentations, I can do Music, I can do Folders with that name. So right away I can refine the search and make it much more powerful. I can add more to this. So I can hit the Plus button here and add another item to the criteria. So for instance I can do Kind is Text. I can further refine and say Plain text, Rich text, you know what type of text here. I can say Name matches to I can further refine the name or I can choose something else like, for instance, the Last opened date is within the last 300 days. You can see that narrows it down to three files.
Now I've got two pieces of criteria here. One is the Kind is Text. The other is Last opened date. So it's going to and those. It's going to give me files where both those conditions are true. But what if I want to have either one of those conditions true. So I'm going to use the minus button to remove this condition here. If I hit the plus button I can add another item to the criteria here and it will give me any files that match both of those.
But if I hold the Option key down I get three dots. I click that and now I have two lines. The first one says any of the following are true. I can change any to All or None. Then I have a line underneath that's indented. I can set that to anything I want. So let's say the Last opened date is within the last 300 days. But I can add another one here that's also indented under this Any and say the file size is greater than 1KB. Now it's going to look for either one of these to be true. So now I'm going to get files that are both in the last 300 days and files that are greater than 1KB in size. I can change that to All and it kind of makes it the same as if these weren't indented. I only get files that have both of these conditions. I can also say None so I only get files that will not match either of these two conditions.
So this makes it much more powerful to be able to have this of the following are true statements here. You can nest these. So I can create another one here underneath this. So i can make this Any of the following are true and then one of the items here is All of these have to be true. So this makes it very powerful. You can use this with Name as well. So I can get rid of name there now that I have some items. So now it's not going to try to match any name. But I can do things like the name begins with the letter A and the name begins with the letter B and I'm going to get files that start with the letter A or the letter B. If I change it to All I'm going to get nothing because there's no such thing as a file that starts with both those letters. If I switch to None I'm going to get files that do not have A or B at the beginning. There you can see when I sort alphabetically I get C and on.
Now going beyond that you have more options than just Name, Last opened date, etc., here. You can go to Other and you're going to get a huge list of rules that you can add. A lot of these apply to metadata and video and audio files. Also photos as well. You're going to get things like Genre for genre of music, iSO speed for photos, things like that. There are some interesting things in here including the ability to do a Raw query and I have a whole video to use that. Anyone that you see in here you can easily add to that main list. So, for instance, I can do Number of items, which is something that you can use to search for folders that have more than a certain number of items in them. So I can select that one. I can hit OK and it now changes to Number of items. But I could also go back here to Other and I could find that Number of items and say that's something I want to use all the time. I could check the checkbox there and now Number of times appears here in the list.
You could also search in here. For instance if you know you want to search for images by width for instance I can type width and sure enough there's Page width for documents. Pixel width and Resolution width. So I can do Pixel width here and I can search for images is greater than say 1000 pixels so photos. Maybe look for things that are less than a 1000 to see some clipart that I've got. You can get really creative with what you choose here from this list of criteria for very specific searches.
If you have a search that you've carefully put together with lots of items here and you want to save it, you can hit the Save button and what it's going to do is save a Smart Folder as a saved search file. You'll save it in your Library folder under Saved Searches and it allows you to add it to your Sidebar if you want. Or you can just save it anywhere you want. You can save it to your Documents folder and when you open up that saved search it will instantly give you back the criteria list that you have here.
Thanks, Gary. A very useful video.
Great video! I've been waiting for something like this for years. Thank you! The OPTION key opens a whole new world. Still have a question -- in the "Name" criteria what is the difference between "is" and "matches"? When I search for, say, the Stocks app, and use "Name is Stocks" the search returns nothing, but when I use "Name matches Stocks" Finder finds the app.
Perry: "Is" will find that name exactly. "Matches" will find anything with a name that contains that text. The Stocks app's file name is "Stocks.app"
Apparently the Smart Search Attribute "Document Container" can be used to exclude a folder but I've never managed to get it to work.
Something like:
Document Container...is not ... FolderXYZ
or
None of the following are true
Document Container...contains...FolderXYZ
should do it. Adding quotes to "FolderXYZ" doesn't help.
Am I using this wrongly? Or is there another way to achieve folder exclusions from Smart Searches? [Thanks!]
Hi Gary, sorry to trouble you. I cannot open the searching window as you do in the video.
Clicking Command+F nothing happen
Do I need to select something before ?
Thanks and greetings from Italy
Paolo: Are you in the Finder?
Jasper: I don't "Document Container" works like that. Even though the description seems to indicate that it is the containing folder, posts online seem to indicate that it is something less useful,, perhaps pertaining to iCloud or maybe the volume or something.
When I finish my "complex search", what is the keystroke to exit search mode? ESC does not exit search mode, and CONTROL-F does not toggle it off.
PJ: All you are doing is looking at a Finder window with search results. You can "exit" the search by going somewhere else or simply closing that store Finder tab or window. So click on a sidebar item or use the Go menu if you really want to keep that Finder window open for some reason. Otherwise, just close the window.