Scripting Additions Guide
Table Of Contents
CHAPTER 2
Scripting Addition Commands
Command Definitions 33
List Folder 2
The List Folder command returns a list of every file and folder in a specified
folder or volume. List Folder is one of several commands provided by the File
Commands scripting addition.
SYNTAX
list folder referenceToFolder
PARAMETER
referenceToFolder
A reference of the form file nameString, alias nameString, or
folder nameString (see “Notes”).
Class: Reference or string
RESULT
A list of strings.
EXAMPLE
list folder "My Disk:"
--result: {"Letters", "Current", "Projects", "Aliases"}
NOTES
To specify the name (nameString) of a folder, use a string of the form
"Disk:Folder1:Folder2:...:FolderName" as described in Chapter 5, “Objects
and References,” of the AppleScript Language Guide. If you specify only the
name of the folder (FolderName) instead of its entire pathname, AppleScript
attempts to find the folder in the current directory.