Chapter 20. Scripting the File System

Chapter 17 looked at the various ways you can identify the files, folders, and disks that make up Mac OS X's file system. In this chapter, you'll learn how to manipulate these objects using scriptable applications. We'll also look at some useful file system-related commands provided by the Standard Additions scripting addition.

Mac OS X includes two scriptable applications that can manipulate the file system: Finder and System Events. I'm sure you're already familiar with the Finder, but you may not have heard of System Events before so let's do a quick introduction.

System Events is what's known as a "faceless background application"—a GUI-less program that runs invisibly on your Mac. Such applications are ...

Get Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.