Find Your Files

When we think of file management, it’s usually focused on the front end of dealing with files: organizing how and where they’re stored, adding metadata like tags to better identify them, and setting up ways to make the process easier. Once a file has been handled, we move on to the next, and then to the next.

That work is all to service the other side of file management: finding those files later, whether that means knowing immediately which directory to open or using search tools to get software to do the work for you.

Find Files in macOS

Apple’s Spotlight search technology is woven throughout macOS, collecting results from your web browsing history, contacts, calendar events, and several other sources. For our purposes, of course, I’m focusing on locating files and folders in the Finder.

Filter Files by Tag

I’m getting this one out of the way early because it’s quick and easy. Expand the Tags list in the sidebar of a Finder window and select a tag to view only files marked with that tag. You can select only one tag at a time, though, so if you need a more complicated search, keep reading.

Perform Spotlight Searches

Most often, you’ll probably want to bring up the Spotlight window, which can be invoked in any app, not just the Finder. It’s a good first step, and you can refine the search if needed. To perform a general Spotlight search, do the following:

  1. Click the Spotlight icon in the menu bar, or press ⌘-Space, to bring up the Spotlight window (Figure 55).

    Figure 55: The Spotlight Search bar is a fine place to begin.
    Figure 55: The Spotlight Search bar is a fine place to begin.
  2. Type anything in the field; results appear as you type, even filling in words that macOS thinks you might be looking for based on recent items (Figure 56).

    Figure 56: I’ve typed only “rocket” so far, but Spotlight has suggested the Rocketeering 101 folder as the top pick because it has been recently modified.
    Figure 56: I’ve typed only “rocket” so far, but Spotlight has suggested the Rocketeering 101 folder as the top pick because it has been recently modified.
  3. Use the arrow keys or single-click other items in the list to select them, or scroll to view more.

  4. With a selection made, press Return or double-click the item to open it and exit the search bar.

    Figure 57: Pressing the Tab key gives you a preview while still in the floating Spotlight Search window.
    Figure 57: Pressing the Tab key gives you a preview while still in the floating Spotlight Search window.

If you want to refine the results, scroll to the bottom of the list and choose Search in Finder, where you can apply additional criteria.

Search in the Finder

The Spotlight window is the quickest way to perform a search for a wide range of items, but when you’re specifically looking for files and folders, it’s best done using the Spotlight field in a Finder window:

  1. Open a new Finder window.

  2. Click the Spotlight icon in the window’s toolbar, or press ⌘-Option-F to activate the Search field.

  3. Start typing a search term into the field. The window displays matches as you type (Figure 58). Put words that belong together in quotes, as in "rocket booster".

    Figure 58: Possible matches appear in the window as you type. In this case, the query has found 324 items that include “rocket” in the filename or in the contents of the files. (If you don’t see the item count, choose View > Show Status Bar.)
    Figure 58: Possible matches appear in the window as you type. In this case, the query has found 324 items that include “rocket” in the filename or in the contents of the files. (If you don’t see the item count, choose View > Show Status Bar.)

The advantage of searching in a Finder window versus the Spotlight window is the additional controls available to direct your query. In Figure 58, you can see the option in the pop-up menu to narrow the search to files with “rocket” in the filenames or to show only files marked with the “rocketeering101” tag, plus the option to search This Mac (the entire computer) or just the contents of the window in which you began the search, in this case my home folder “jeffcarlson.”

Use Modifiers in the Search Field

There are two ways to boost the effectiveness of a Spotlight search: using text modifiers when typing the search term, and defining additional criteria using a series of pop-up menus. The first option is the quickest to implement because you’re already typing, though you have to know what to enter; the second option involves more work, but can dig further into the nooks of your files and folders to find results.

In the Search field (and also in the Spotlight window), type not just the term you’re looking for, but information about the term. For instance, the term “rocket” alone brings up hundreds of files on my Mac that either include “rocket” in their filename, contents, tags, or other metadata.

But let’s say we want only image files related to rockets. For that, we’d type rocket kind:image. The results include images from our imaginary school project and a few others, for a total of 10 files (Figure 59).

![**Figure 59:** By typing a few more characters, I’ve narrowed the results to include only images relating to “rocket.”](images/find-spotlight-modifier-kind2-bordered.png){height=216.762667 width=419}

Although we can see the files we want in this list, suppose we want to narrow it to files created in December. We’d type rocket kind:image created:>=12/1/20, which is shorthand for “files containing the word ‘rocket,’ which are image files, and created on or after December 1, 2020” (Figure 60). (Note that there are no spaces within each attribute; spaces are used only to separate them.)

![**Figure 60:** Now we see only the four image files containing “rocket” and created in December 2020.](images/find-spotlight-modifier-createddate-bordered-c.png){height=185.198 width=419}

The Search field also understands the Boolean operators AND, OR, and NOT. Instead of Spotlight trying to find files that match every condition in the field, the operators give you power to exclude or offer alternatives. For example, imagine we want to find every file that matches “rocket,” but we don’t need any of the image files for this search. We’d write rocket NOT kind:image (Figure 61).

![**Figure 61:** Adding <code>NOT</code> removes image files from the results.](images/find-spotlight-modifier-bool-not-bordered-c.png){height=161.454667 width=419}

For another example, "rocket booster" AND jetpack NOT kind:image reveals files with both the terms “rocket booster” and “jetpack,” but which are not images. You can substitute a minus sign (hyphen) for NOT, as in "rocket booster" AND jetpack -kind:image.

Add Search Criteria

Boolean operators and modifiers are certainly convenient. However, this approach annoys me somewhat because you need to have these descriptors in your head already. (To be fair, in most cases you can make educated guesses and hit the mark, such as kind:pdf or modified:<12/9/20.)

That’s why the capability to define all sorts of search criteria in a Finder window is so powerful. You can find items using sets of criteria in fields and menus, laid out in front of you, so you don’t have to shake your memory for the correct terminology. Here’s how to access these controls:

  1. After you initiate a search, click the Add button at the right side of the window below the search field, which adds a new criterion to the top of the window.

  2. From the first pop-up menu, choose which attribute to search, such as Name, Tags, or Kind.

  3. The context of the attribute determines the next options. For instance, the default options for [Last modified date] look for matches within the last number of days (Figure 62). You can change the scope using the pop-up menus and number field to read [Last modified date] [is after] a specific date.

    Figure 62: Choose several date ranges to filter the results.
    Figure 62: Choose several date ranges to filter the results.
  4. To add more criteria, click the Add button for the item you just created; the new criterion appears below it.

The search results update as you specify criteria.

Where this approach gets really interesting is in the wide variety of attributes you can search for. Click the Add button and choose Other from the first pop-up menu. That displays a dialog containing hundreds of other criteria (Figure 63).

Figure 63: Search files based on hundreds of criteria.
Figure 63: Search files based on hundreds of criteria.

For example, if you wanted to find placeholder images in your project in order to replace them with better quality ones, you could add the attribute [Pixel width] and set it to [is less than] 1000.

If you find yourself using one of these “other” attributes frequently, select the In Menu checkbox to add it to the first pop-up menu that appears when you add a new criterion.

Lastly, we come to Spotlight’s secret weapon in Finder window searches. I mentioned earlier that you can use the Boolean operators AND, OR, and NOT when doing a text search. You can do the same in the criteria menus.

The way the menus are constructed, the criteria fall under the “all” umbrella, where a file must match every item to show up in the search. For example, Spotlight would find files that include the word “rocket,” and were modified after 12/1/2020, and include the tag “jetpack.” If just one of those three attributes don’t apply, a file doesn’t appear in the results.

But what if you’re working on two rocket projects, one for school and one for your personal use? The query above would collect files for both projects. Using the Boolean option, you can make the query selective:

  1. Hold Option and click the More button that appears in place of the Add button. A pair of criteria are added: the Boolean operator on one line, and a regular criterion on a second, indented line.

  2. Set an operator from the first item: Any, All, or None (which correspond to OR, AND, and NOT).

  3. Set the attribute for the second item.

    For our example, we’d set the Boolean operator to None, and the attribute to [Tags] [matches] rocketeering101 (the class name) (Figure 64).

    Figure 64: By omitting the “rocketeering101” tag with a Boolean operator of None, the files for this amazing—explosive, I dare say—business idea is kept separate from the jetpack school work.
    Figure 64: By omitting the “rocketeering101” tag with a Boolean operator of None, the files for this amazing—explosive, I dare say—business idea is kept separate from the jetpack school work.

Create Smart Folders for Frequent Searches

Building an elaborate search in the Finder seems like a lot of work each time you want to find something, but that effort doesn’t have to be tossed once you get the results. You can save the entire query as a smart folder, or create a smart folder from scratch, that performs the search whenever you load the folder. (If you’re familiar with smart albums in the Photos app or smart playlists in the Music or iTunes apps, it’s the same concept.)

Using the example in Figure 64, where you have two separate but similar projects, it’s inevitable that more files will be added that fit the same criteria. Saving that search as a smart folder gives you the ease of opening a folder to reveal the files, instead of re-running the search, and the knowledge that the contents will be automatically updated to reflect any new or changed files that fit the criteria.

If you’ve decided to Organize Using Tags, or chosen to integrate tags more into your organizational system, smart folders really make that decision pay off. In the sidebar of Finder windows, you can select a tag in the Tags list, but only one tag at a time. A smart folder lets you save queries that include multiple tags.

Create a Smart Folder

There are two ways to create a smart folder: start one from scratch, or save the criteria from a current search. For the former, in the Finder choose File > New Smart Folder and add criteria as you did above in Add Search Criteria. In both cases, follow the next steps to save the search as a smart folder:

  1. Click the Save button below the search field.

  2. In the dialog that appears, give the smart folder (which has the filename extension .savedSearch if you’ve have all filenames visible) a unique name (Figure 65).

    Figure 65: Save the search query as a smart folder.
    Figure 65: Save the search query as a smart folder.
  3. Select the Add To Sidebar option to include the smart folder in the list of favorites for quick access.

  4. Optionally choose a location for the smart folder (especially if you choose not to add it to the sidebar). The default location for them is ~/Library/Saved Searches/, which isn’t normally accessible to browsing (see the sidebar just ahead, Reveal the Hidden Library Folder).

  5. Click Save.

To access the smart folder later, select it in the sidebar (if you saved it there), or open it as you would any other folder in the Finder, such as by double-clicking it. Smart folders appear colored purple with a gear icon to differentiate them from other folders (Figure 66).

Figure 66: I’ve saved this smart folder to the desktop. It also appears in the sidebar because I selected Add To Sidebar when creating it.
Figure 66: I’ve saved this smart folder to the desktop. It also appears in the sidebar because I selected Add To Sidebar when creating it.

Edit an Existing Smart Folder

A smart folder is endlessly malleable, so if you want to add or remove search criteria, you can do it easily. Here’s how:

  1. Open a smart folder to view its results.

  2. Click the Action icon and choose Show Search Criteria.

  3. Change the criteria as needed to update the search results.

  4. Click the Save button.

To remove a smart folder you’re no longer using from the sidebar of Finder windows, right-click (or Control-click) it and choose Remove from Sidebar, or drag it out of the window until the Remove icon appears on the pointer.

The smart album itself is still available where you saved it. If you want to delete it entirely, do the following:

  1. Locate the smart folder in the Finder. If it’s in the Finder window sidebar, right-click it and choose Show Enclosing Folder. Or, if it was saved in the default location, go to ~/Library/Saved Searches.

  2. Drag the smart folder to the Trash, or select it and choose File > Move to Trash.

Because a smart folder is just a search query, none of the actual files and folders that appear in it are sent to the Trash.

Perform a Siri Search

Even when I’m working alone in my office, I’m not inclined to ask Siri to search for files for me. Plus, the accuracy depends entirely on how well Siri understands the request. That said, if you’re more chatty than I am, you may find it useful. To search for files using Siri, do this:

  1. Click the Siri app in the Dock, the Siri icon in the menubar, or say, “Hey Siri” (although the latter may be picked up instead by an iPhone or other Apple device nearby). If you own a MacBook Pro with a Touch Bar, touch the Siri icon there.

  2. Speak your search phrase, such as “Show me all image files tagged with rocket.” The text is dictated in the Siri window.

  3. Sometimes Siri will start the search when you stop speaking; more often, I find that I need to press the Siri icon again, click the active Siri icon in the Siri window, or press the Esc key, to complete the query. If results are found, they appear in the window (Figure 67).

    Figure 67: Invoking Siri brings up the familiar listening window (left). In the results window (right), you can see at the top where it initially didn’t transcribe my request correctly.
    Figure 67: Invoking Siri brings up the familiar listening window (left). In the results window (right), you can see at the top where it initially didn’t transcribe my request correctly.
  4. Click one of the results to open a specific file or folder, or choose “Show all number results in Finder” to view them in one window. (As of Big Sur 11.1, this should work, but it appears to be buggy.)

Go Beyond Spotlight with Search Utilities

Spotlight can be a powerful tool. In Apple fashion, however, a lot of it is hidden to make it less intimidating for most people. And, to be honest, sometimes Spotlight just doesn’t work well, in which case it’s worth looking at a few utilities that buttress or replace Spotlight.

HoudahSpot

HoudahSpot taps into the Spotlight index with an interface that presents several search criteria up front. It’s also often faster than standard Spotlight searches.

A few other things stand out with HoudahSpot:

  • It can search multiple locations at once, such as your home folder and a mounted network drive, in the same query. Additionally, you can exclude specific locations. For example, suppose you want to search your local volume and a mounted NAS volume, but not a big “Temp Storage” folder there.

  • HoudahSpot can search your Apple Mail messages just as easily, since Spotlight also indexes those.

  • Several search templates are included, and you can save your own searches (much like creating smart folders in the Finder). The Misplaced Music Files search, for instance, looks for any audio file longer than 30 seconds that isn’t in your Music or iTunes library (Figure 68). Another template, Long Lost Files, looks for files that haven’t been opened or used within the last five years. And, of course, you can edit the templates and create your own.

    Figure 68: A HoudahSpot pre-made template finds those audio files you may have downloaded but not added to your Music library.
    Figure 68: A HoudahSpot pre-made template finds those audio files you may have downloaded but not added to your Music library.

Path Finder

Path Finder has been around since long before the Finder was remotely as capable as it is now. It offers a multi-pane experience that feels a bit like being in the cockpit of an airplane. In addition to browsing folders, you can activate modules for tagging, running Terminal commands, checking file permissions, and lots of other geeky file-related things (Figure 69).

Figure 69: Path Finder wants you to forget the macOS Finder exists. In fact, a preference exists to quit the Finder entirely when Path Finder is running.
Figure 69: Path Finder wants you to forget the macOS Finder exists. In fact, a preference exists to quit the Finder entirely when Path Finder is running.

The search capabilities are similar to the Finder’s, looking for Spotlight criteria and being able to save searches for later. You can also perform a “low-level search” that doesn’t use the Spotlight index and focuses on file attributes like dates, size, and other criteria.

Find Files in iOS and iPadOS

The iOS and iPadOS implementation of Spotlight isn’t as broad as in macOS, but the basics are there. You can start searches on the home screen, or jump into the Files app, which has more options.

Search Using Spotlight

To invoke a Spotlight search on the home screen in an iPhone or iPad, do the following:

  1. Swipe down to reveal the search field, or swipe right to view widgets and then tap to activate the search field (Figure 70).

  2. Type or dictate your query into the field.

  3. Depending on what comes up in the results, tap the file or folder you want. Or, tap Search in App for the Files app to continue the search there.

    Figure 70: Swipe down on the home screen to start a search (left), which you can continue in the Files app (right).
    Figure 70: Swipe down on the home screen to start a search (left), which you can continue in the Files app (right).

Search in the Files App

The search capability in the Files app is similarly limited compared to macOS, but it does have a glimmer of extra functionality. Type a term into the search field to find potential matches. You also have a few other options:

  • If any tags match what you’re typing, they appear below the search field. Tap one to restrict the search to files and folders with those tags.

  • To specify a kind of file, type that term and choose an option that appears below the search field. For example, to restrict the search to just images, type images and choose Images (Figure 71). Criteria that are not just text matches appear with icons. When you tap one, it appears in the search field in a box.

    Figure 71: Here I’ve restricted the search to images (left), and then added more parameters to narrow the results (right).
    Figure 71: Here I’ve restricted the search to images (left), and then added more parameters to narrow the results (right).

    For another example, type doc into the field and you’ll see several document types of documents that iOS recognizes, such as “PDF document” and “Pages Document,” to choose from.

  • Some time-based searches are possible. Type yesterday or december or a date like 12/1/19 and choose the option that pops up (the latter shows “Tuesday, December 1, 2019”). You can also type last number days and specify a number such as 15 to view items created or modified within the last 15 days, or after 11/1 to find items after November 1 of the current year.

To act on a search result, tap an item to open it, or touch and hold to display the contextual menu with options.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.209.209.28