Smart ways to work with smart folders

Want to keep track of all documents you have greater than 500MB in size? All your PDFs? All your OpenType fonts? Pictures taken with your Canon PowerShot within the last two weeks that have less than a specified focal length and greater than a specified exposure time? If you can set up a search for something in the Finder, you can make a smart folder for it too. These dynamic folders—which don’t actually hold anything, but merely list items stored elsewhere—continually update to display the items on your computer that meet your search criteria. Smart folders can save you time when you would otherwise need to rebuild a search from scratch, helping you find, track, and organize files and folders.

Create and save your smart folder

To create a smart folder in the Finder, select File -> New Smart Folder (or press Command-Option-N). The window that opens looks like a standard Finder search window, but its title is New Smart Folder. Set up a search here the way you would normally, typing in the Spotlight field and clicking on the plus-sign (+) buttons to add criteria (for example, created or modified dates). To learn the basics (and more) about setting up an effective search, see Advanced searches in the Finder. After you’ve specified your criteria, save the Smart Folder by clicking the Save button to the right of the search bar and then naming the folder.

Tip If you do a search in the Finder, and only then realize it would be handy to have a smart folder that uses those criteria, simply click the Save button in the window’s search bar.

You can save a smart folder anywhere—on your desktop, inside a project folder. But if you don’t change the destination in the Save As dialog box, by default smart folders go to a folder named Saved Searches (youruserfolder/Library/Saved Searches). You’ll need to navigate there if you want to rename or delete a smart folder.

Saving smart folders
By default, OS X saves smart folders in a special folder called Saved Searches, but you can put them anywhere by changing the location when you save. Use the Add To Sidebar option to get easy access to your smart folder from any Finder window’s sidebar.

Restore a smart folder to the sidebar

By default, all smart folders get added to your Finder window sidebar for one-click access. But if you drag a smart folder out of the sidebar—or uncheck the Add To Sidebar option when you’re first saving it—your folder is not condemned to obscurity. Go to the Saved Searches folder, or to whatever location you may have saved the smart folder, and drag the folder into the Search For section of the sidebar. (When you do this, the original folder doesn’t actually move. To learn more, see “Get efficient with the Finder’s sidebar”)

Relocate smart folders in the sidebar for quicker access

The Search For category is at the bottom of the sidebar; so, if you keep a lot in there you’ll have to scroll, or collapse the sidebar’s upper categories to get to a smart folder in the list. If you need to access one frequently (even just for the duration of a project), put it in the higher-up Places category instead. To do this, drag the smart folder off of the sidebar. Then open up the Saved Searches folder in the Finder, and drag the original smart folder directly to the desired spot under Places.

Show certain smart folders only when in certain applications

If you use smart folders for a lot of ongoing projects, you might soon find your Finder window and Open and Save dialog boxes’ sidebars cluttered with folder after folder. Lucky for you, OS X lets you create a smart folder from within an application’s Open or Save dialog box, and then save it so that it’s visible only when you’re using that application.

Start in the application, and choose File -> Open or File -> Save. Press Command-F or click in the Spotlight search field in the dialog box. As soon as you type something, the search bar appears just as it does in Finder search windows, letting you set parameters such as the scope of the search, and even add criteria bars. When you click the Save button in the Search bar, the dialog box that appears provides a special option: Display Smart Folder For This Application Only. Check the box, and a new category—Saved Searches—appears in the dialog box’s sidebar, with your new smart folder listed beneath it. Every application gets its own personal Saved Searches list, and none of these smart folders show in the Finder sidebar. Delete an application-specific smart folder by dragging it off the sidebar when you’re in the program’s Open or Save dialog box.

Edit a smart folder’s definition

You created a smart folder that searches for all your Word documents, excluding those miscellaneous files that would also be included in a simpler search (Word recovery documents, temporary background files, templates, and so on). Now you want to limit the search to only the documents you’ve modified in the last two months. You don’t have to start from scratch with a new smart folder, recreating its complicated initial parameters.

Use a command tucked away in the Finder window’s Action menu (the toolbar menu item with the gear icon). To edit a smart folder’s search criteria, first click on it in the sidebar to open it. From the Action menu, choose Show Search Criteria. Then alter or add to the conditions as needed. When you’ve set up the new criteria the way you like, click the Save button in the search bar.

Edit a smart folder
This smart folder was originally set up to find Microsoft Word documents, excluding four types of the program’s support files. I edited it by choosing Show Search Criteria (inset) and then adding a Last Modified Date parameter to make it even more useful.

Create a new smart folder based on an existing one

Sometimes you create a complicated smart folder definition (such as the one described in the previous tip) and then need a second one with, say, only the created or modified date set to a slightly different parameter. You don’t have to start over from scratch.

Go to youruserfolder/Library/Saved Searches. Select the smart folder that’s going to serve as your basis for the new one and then choose File -> Duplicate to make a copy. Rename it and drag it into the sidebar. Open this new folder (by double-clicking on it in the window or clicking on it in the sidebar), and edit it as described in the previous tip. When you click the Search bar’s Save button, the altered definition will be stored for the new smart folder.

Mac writer Sharon Zardetto has posted a blog entry on MacTipster explaining how to set up a smart folder definition for Word documents that excludes Word’s support files.

To comment on this article and other Macworld content, visit our Facebook page or our Twitter feed.
At a Glance
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.