Name

path to

Synopsis

standard folder location

standard folder location

Locates various standard folders, such as the system folder. If the designated folder is legal but doesn't exist, the path to command silently creates it unless you specify without folder creation, in which case an error is returned if the folder doesn't exist. If a standard folder isn't listed as an enumerator, you can use its four-letter code (see http://developer.apple.com/documentation/Carbon/Reference/Folder_Manager/index.html ). Returns an alias, or a string, if desired (or Unicode text—the dictionary fails to document this fact).

Example

path to desktop -- alias "feathers:Users:mattneub:Desktop:"
path to "cmnu" -- alias "feathers:Library:Contextual Menu Items:"

Get AppleScript: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.