folder(
FOLDER
)

The folder( function creates a Folder ID that unambiguously describes the location of a folder on the hard disk.


Parameters

This function has one parameter:

folder – the path to the folder. See Files and Folders for details about file paths.


Description

This function returns a unique value, called a Folder ID, that unambiguously describes the location of the folder. The Folder ID can be used as a parameter to various functions and statements to specify the folder to be operated on.

In older versions of Panorama Folder IDs were opaque 6 byte binary values (opaque meaning you couldn’t directly look at a Folder ID value and tell what it meant). Folder IDs could not be created manually, only with special functions like the folder( function. In the current version of Panorama, Folder IDs are no longer opaque binary values. Instead, they are simply standard, fully qualified paths. Fully qualified means that the path must be absolute (starting with /) and contain the complete path of the folder. See Files and Folders for details about file paths. This example creates a Folder ID for the user’s Documents folder (the results shown below assume that the name of the current user is mark):

folder("~/Documents") ☞ /Users/mark/Documents

Note: The path supplied to this function must specify a folder that actually exists. If it doesn’t, the folder( function will return empty text (""). This can be useful as a quick test to see if a folder exists or not.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now the generated Folder ID is a path (text) instead of an opaque binary value.