Set multiple folder views via Automator

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

Do you prefer to use one type of Finder window, and only one type? If so, you’re probably somewhat frustrated by OS X’s ability to seemingly randomly pick a different view. You like using icons, for instance, but find that some folders in your home folder open in list or column view. Sure, you can change each one as it opens, but that’s a bit of a pain. If you’ve upgraded to 10.4, there’s a simple solution available, thanks to Automator. Obviously, the following steps could be used for any folder on your machine, but we’ll use your user’s folder for this example.

First, make sure you can see your user’s folder in the Finder. The easiest way to do this is to click on your computer’s name in the sidebar, or click on your home folder and then hit Command-Up Arrow. You should now see your actual user’s folder, along with those of any other users you’ve created on your system. Leave this window open, then launch Automator, in /Applications. Position the Automator window and the Finder window you left open such that you can see both at once. Now drag and drop your user’s folder into the blank area on the right side of the Automator window. If you don’t have enough screen space to see both windows, switch to the Finder, click and hold on your user’s folder, then hit F9 to activate Exposé, drag your user’s folder over the Automator window, hit F9 again (or just wait a second), then drop the folder. When you’re done, you should see something like this in the Automator window:

Next, still in Automator, click on the Finder item in the Library column, and then drag Set Folder Views from the Actions column into the right-hand workspace. Drag and drop it below the existing entry for your home folder. What you’ve just done is to create the view action that will act on the folders in your home folder. The next step is to customize the settings to match your desired views. As an example, here’s a look at a possible set of settings for icon view:

As you can see, the icon size, text size, label position, item info, preview, and more have all been set, and a background color has been specified. In addition, the Apply window properties section lets us enable the toolbar, status bar, and even set the width of the sidebar.

Near the bottom of the screenshot, though, is the key to this Automator action—to change the views on all the folders in your user’s folder, you must check the Apply Changes to Sub-folders checkbox. Once enabled, your Automator action will run on every folder within your user’s folder, not just the topmost one. Putting it all together, this full-size screenshot is representative of the completed Automator action—your version, of course, will have your home folder and your view settings in it.

Please read this bit before proceeding! Before you go any further, be aware that the next step will set all folders in your user’s folder to the settings you’ve created here. It may also take a while to run, depending on how deep your folder structure is. No data will be lost, but if you had customized window settings for a folder (for instance, a downloads folder in list view sorted by date), those settings will be overwritten.

The last step is to simply click the Run button and wait for Automator to finish running the action. When it’s done, every folder in your user’s folder will open with the settings you created. Save your Automator action somewhere handy for future use, just in case you want to run it again.

What About New Folders?

When you add a folder to your user’s folder, it won’t automatically inherit these settings—it will keep whatever settings are presently in use. There are two solutions to this problem. The “big hammer” approach is simply to open your saved Automator action, and run it again. But this is overkill for fixing a few folders.

Instead, open your existing action, and delete the first action in the work area (the Get Specified Finder Items entry). Just click once on it, then hit delete. This leaves just the Set Folder Views action in place. Next, select File: Save As Plug-in, and give your new plug-in a name like “Set Folder to My View” or something similarly remindful of its functionality. Set the Plug-in For pop-up to Finder, and click Save.

You’ve now got a new Finder plug-in you can easily use to set the view options for a given folder (and its subfolders, unless you removed the subfolder option). Just highlight a folder in the Finder, control-click on it, scroll down to Automator, and choose Set Folder to my View from the submenu. Presto, you’ve just changed everything to your preferred view.

You could expand this last step, too—create a number of different view settings, one each for icon, list, and column view, each one set up as you prefer. You should also probably uncheck the Apply Changes to Sub-folders box as well, so that you’ll take action only on the current folder. Then just save each as a Finder plug-in, and you’ve got a quick and easy way to set any one folder to a customized view.

Automator is really a powerful tool that can help you create simple tools that make using OS X even more fun and productive than it already is.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon