O'Reilly logo

AppleScript® Programming for the Absolute Beginner by Jerry Lee Ford

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

Working with Full and Relative Paths

AppleScript lets you work with both absolute and relative paths. All of the examples of paths that you have seen so far have been absolute paths. An absolute path is one that specifies the disk drive, folder, and subfolders in which a file or folder is stored, as demonstrated here.

Macintosh HD:Users:Jerry:Documents:DemoFile.txt

When you work with relative paths, you specify the location of a file or folder relative to the current working directory. By default, the current working directory is the folder in which an AppleScript is stored. For example, suppose an AppleScript was stored in a folder located in the following folder:

Macintosh HD:Users:Jerry:Documents:

If the AppleScript needed to reference a ...

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