Chapter 11. Linking Scripts to Folders with Folder ActionsImagine: your Mac reminds you to clean the sink whenever you open your Applications folder. You automatically see a dialog box whenever someone on your network drops a file in your Public folder. And your desktop automatically cleans itself up when you fill it with too many icons. Now stop dreaming. Everything you just imagined is only a script away, thanks to the special folder actions feature you get with AppleScript and Mac OS X.
A folder action is an AppleScript like any other. The difference is that you can attach a folder action to a specific folderand have the script run automatically when you do something to that folder. You can trigger a folder action when you open a folder, close a folder, or copy items into a folder, for example. With triggers like these, the scripting possibilities are truly limitless.
|