Mac OS X 10.4 Help

AppleScript Icon

Running an automation when a folder is changed

Folder actions let you run automations when a folder is modified. For example, you could run an AppleScript or an Automator workflow whenever something is added to a dropbox folder.

To use folder actions, you attach a folder action script or workflow to a folder. When the folder is opened, closed, or modified, the automation will be activated automatically.

Your script must include a handler for each folder action command used.

To make a folder action scripts available to all users of your computer, put them in the Folder Action Scripts folder located at:

Library/Scripts/Folder Action Scripts/

To make the scripts available only to the current user, put them in the home folder at:

~/Library/Scripts/Folder Action Scripts/

To enable folder actions:

  1. Open Folder Actions Setup in the Applications/AppleScript folder.
  2. Select Enable Folder Actions.
  3. Click the + button below the Folders with Actions list and choose the folder containing the folder actions.
  4. Click the + button below the Script list and select the desired scripts, then click Attach.

For more information look in the Standard Additions dictionary. You can access AppleScript dictionaries in the Script Editor application, choose Window > Library.

Keywords: khelp kmosx kmosx4