How to Use Folder Actions in Automator
Posted 02/04/2013 at 2:00pm
| by Cory Bohon
Folders are a great place to store files and subfolders, but folders can also be smart about the content they’re storing. For instance, Dropbox can whisk files stored in its folder into the cloud — so why can't you do something like this with any folder? Well, as it turns out, you can, and all you need is a simple script cobbled together in OS X’s automation tool, called Automator. Continue reading, and we’ll show you how to use Folder Actions to turn regular folders into smart-ified folders with pizazz.
What is a Folder Action?
A folder action is just that... it’s an action that you can place on a particular folder that will be run whenever new files (or folders) are added to that smart folder. You can do things like cropping and emailing photos when they are added to a folder, or any number of other actions.
You can created Apple Script-based folder actions, or Automator-based folder actions. For simplicity's sake, we’ll take a look at how to create folder actions using Automator, since more Mac users will be able to take advantage of this powerful tool.
The Synopsis: We’ll be using Automator to create a folder action that will resize images dropped into a folder and create a new email with the resized images attached.
Difficulty: Medium
1. Create a Folder Action
To begin, launch Automator (located in your Applications folder). When the application launches, select “Folder Action” from the list of available Automator workflow types.

The Folder Action workflow makes it so that added files trigger the workflow, and are also the input to the workflow. Once selected, at the top of the workflow, you will see a “Folder Action receives files and folders added to ...” Using the drop-down menu, select “Other,” and navigate to and select a folder on your system that you wish to attach the folder action to.
Next, we’ll begin building the workflow that will get triggered when files are added to the folder containing the action.

Find and drag the following actions to the workflow section of Automator (the right-hand palette, underneath the folder selection):
1. Scale Images — Select “Don’t Add” at the copy prompt that appears; select by percentage for the scale option, and enter a scale amount (we’ll use 50%)
2. New Mail Message

That’s all.
Select File > Save, and in the save dialog, enter the name of the workflow that you wish to reference this folder action by in the future.
2. Using Folder Actions
To use your new folder action, simply drag and drop an image file you wish to scale and email to the folder that has the action linked to it (which you specified in the Automator workflow).
In the blink of an eye, you’ll see the Automator workflow spring into life. The images that were dropped into the folder will be scaled by the percentage that you specified, and then added to to a new email.
3. Removing Folder Actions

To remove a folder action, you can simply delete a Folder, or you can right-click on a folder and select Services > Folder Action Setup. From the window that appears, uncheck the box labeled “Enable Folder Actions.”
Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author on Twitter.