The event handlers supported by folder actions are defined in the Standard Additions scripting addition that comes with OS X. Initiate any automated task when a new file or folder is detectedĪdjust or reset the view properties of a folder’s window when it’s opened, closed, or resized Perform processing of newly detected files and folders Notify you when existing files and folders are removed from a folder
Notify you when new files and folders arrive in a folder With folder actions, you can create automated workflows that: A folder action script includes one or more event handlers that run in response to certain events, such as opening, closing, or adding items to the connected folder.
In OS X, there are two primary ways to set up scripting-based watched folders: folder actions and stay open script apps.įolder actions is a feature in OS X that lets you connect scripts to folders on your Mac. Many companies set up script servers-dedicated robot machines that watch folders and process detected items, allowing employees to offload tedious and repetitious work in order to focus on other important tasks. A watched folder might be used, for example, to watermark incoming photos, convert them to PDF, and email them to clients for review. The ability to watch folders and take action on incoming items is a powerful automation technique that enables the creation of fully unattended workflows.