Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 23. AppleScript Amenities > Triggering Scripts with Folder Actions

23.3. Triggering Scripts with Folder Actions

Folder actions allow you to create hot folders on your Mac that trigger a script whenever the folder is modified. You create a folder action by attaching a script to a folder. This script can contain one or more special event handlers that activate when the folder window opens, closes, or moves, or when items are either added to or removed from the folder.

Folder actions are great for any hot-folder setup you need to create. Imagine any workflow in which files need to be processed automatically but a person has to trigger the automation by telling the script which file or files to process. Although you could have created the same workflow using a script application saved as a droplet (that is, containing an open handler), folder actions give you a wider variety of action-triggering events and allow users to trigger scripts by dropping files into a folder, which may be more workflow-like than dragging and dropping files on an application droplet.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial