O'Reilly logo

Apple® Automator with AppleScript® Bible by Thomas Myer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Folder Actions

THIS CHAPTER

  • What are Folder Actions?

  • Enabling Folder Actions

  • Folder Action Scripts

  • Creating your first Folder Action Script

  • Creating Folder Action plug-ins with Automator

In Chapter 12, you learned how to create applets and droplets, which brought your AppleScript abilities up to a whole new level. Instead of having to invoke and run your scripts via AppleScript Editor, you can now create scripts that can be invoked via simple actions: either by double-clicking a mouse or by dropping files onto the scripts.

In this chapter, you're going to learn about folder actions, another extremely useful tool that will make your automations a lot more sophisticated. Without further ado, let's get started!

What Are Folder Actions?

Put simply, Folder Actions are a feature that lets you associate AppleScripts with individual folders. Whatever you do to that folder (move, copy, add files, remove files, rename, whatever) can trigger the Folder Action Script that's been associated with that folder.

In other words, think of Folder Actions as giving you the ability to create hot folders that respond to actions. Imagine being able to create a folder on your desktop that automatically sends any file placed into it to the printer. Or adding an alert feature to your Public folder that lets you know when anyone on the local network adds a file to it. Or adding a workflow to a folder that archives any files that are dropped into it.

At the end of the day, Folder Actions are just one more ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required