Why Would I Want To Know This?
This guide is inspired by a reader question as well as a recent discussion I had about why I use the application Alfred. The question came to me as “I am using Spotlight to find files and while it will let me open them, I can’t figure out where they are or how to actually get to the file on my computer. Can you help?”
I got to work answering this question and once I had a solution, I realized that this would be a great example of how much easier this process is using Alfred and a great example of why I use it. I thought I would show you step by step how this works in each program so you can see the difference.
In this example, I’ll pretend I have a text file where I keep snippets of code that I need to reference or reuse and somehow I accidentally moved it. Now I need to find it and move it back to its desired location.
We’ll start with Spotlight.
Search for the file in Spotlight
- Spotlight can be accessed by clicking on the magnifiying glass at the top right of your screen or the default key shortcut is command – space.
- Type in the information you are using to locate the file. I know in this case that it starts with sql but I don’t know the full name. As I type the characters the results will change in real time to show me the results. Pretty cool.
- Okay – there is my file sql-snippets.txt, I see it right there at the top of the results under documents.
I can preview or open the file from Spotlight.
Hovering over the file name will preview it on the left – this is handy to be sure I have found the right file. Clicking on the file name will open the file in my default text editor. But how do I actually find this file on my computer?
Let’s click on Show All in Finder.
Find The File in Finder
The Show All in Finder option does just what it says it will do. It shows you a view of all the files that it has located and displays them in a finder window. There are a lot of potential matches. I guess I could sort through all of these to find my file.
Maybe I can tweak my search criteria to limit the files it will show.
Another option is to use the built in search tools in Finder to narrow down the results.
- Click the + button which exposes a line to add additonal criteria.
- I know the file is a text document so I select kind is text and plain text. Click the + button again and add additional criteria – I know the file is called sql- something or other so I want to show files with a name that contains that information.
- Yes – this is much better. There is my file! Now where is it really located?
Locate the actual file location
- If you’ve already followed my guide on How To Customize Your Finder, you can see the file path in the bar at the bottom of your finder.
- If not, you can right click on the file and choose the Get Info option.
- This will bring up the inspector and the file path is shown in the Where location.
From here you can drag the file to a location in your Sidebar or on to your Desktop or copy and paste it to a different location.
Now lets find our file with Alfred
- Open an Alfred window using your defined key combination – the default is option – space
- We’re going to use the Reveal command as we want to have the file presented in Finder rather than opening. I begin to type find and press return to access the top item in the presented choices.
Search by file name
- Once the find command is entered I begin to type the name of the file I am looking for, remember I know it starts with sql-
- Because Alfred is searching just by file name the results are much more manageable (there is a different command to search within files if that is the desired option)
- I see my file in the results so I just press the corresponding command to reveal my file, in this case it is return
As soon as I hit Enter I get a Finder Window that is opened in the location of my file, in this case it is in my Documents folder, and the file is highlighted so I can spot it easily. Now I am free to move it to its new location.
While Spotlight can be a wonderful tool for finding information on your Mac, it can also be somewhat overwhelming in the data it returns, even the way it is organized by type. I also find the lack of an easy way to select items from within the results without selecting with the mouse or arrow keys to be annoying with a large pool of results. What is a somewhat cumbersome (and rather unintuitive) process in Spotlight is managed in just a few keystrokes in Alfred, all without taking your hands from the keyboard.