From AlphaWiki

Commands: The [getStandardFolder] command

This page documents the new [getStandardFolder] command introduced in version 8.1d1 of AlphaX.


The new command [getStandardFolder] has been introduced in order to wrap the ToolBox function of the same name. It returns the full path of certain system-related directories. Optionally this function can create (or attempt to create, depending on the permissions) the folders when they do not exist already.


The syntax of the command is the following:

     getStandardFolder ?-create? folderType ?domain?

The arguments have the following signification:

Main folder codes

One must pass a four-character folder type for the folder you want to find. The table below indicates the currently available codes. More information can be found on Apple's Developer Connection at

These codes are declared in the Folders.h header found in the CoreServices framework (see /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Folders.h).

ALM Locations Folderfall
ALM Modules Folderwalk
ALM Preferences Foldertrip
Appearance Folderappr
Apple Extras Folderaexƒ
Apple Menu Folderamnu
Apple Share Authentication Folderauth
Apple Share Support Foldershar
Application Support Folderasup
Applications Folderapps
Assistants Folderastƒ
Audio Alert Sounds Folderalrt
Audio Components Folderacmp
Audio Plug Ins Folderaplg
Audio Sound Banks Folderbank
Audio Sounds Folderasnd
Audio Support Folderadio
Boot Time Startup Items Folderempz'
Cached Data Foldercach
Carbon Library Foldercarb
Chewable Items Folderflnt
Classic Desktop Foldersdsk
Color Sync CMMFolderccmm
Color Sync Foldersync
Color Sync Profiles Folderprof
Color Sync Scripting Foldercscr
Components Foldercmpd
Contextual Menu Items Foldercmnu
Control Panel Disabled FolderctrD
Control Panel Folderctrl
Control Strip Modules Foldersdev
Core Services Foldercsrv
Desktop Folderdesk
Desktop Pictures Folderdtpƒ
Developer Docs Folderddoc
Developer Folderdevf
Developer Help Folderdevh
Directory Services Folderdsrv
Directory Services Plug Ins Folderdplg
Display Extensions Folderdspl
Documentation Folderinfo
Documents Folderdocs
Domain Library Folderdlib
Domain Top Level Folderdtop
Editors Folderoded
Extension Disabled FolderextD
Extension Folderextn
Favorites Folderfavs
File System Support Folderfsys
Find By Content Folderfbcf
Find By Content Indexes Folderfbcx
Find Support Folderfnds
Folder Actions Folderfasf
Fonts Folderfont
Frameworks Folderfram
Gen Editors Folderƒedi
Help Folderƒhlp
ISSDownloads Folderissd
Index Files Folderindx
Installer Logs Folderilgf
Installer Receipts Folderrcpt
Internet Folderintƒ
Internet Plug In Folderƒnet
Internet Search Sites Folderissf
Internet Sites Foldersite
Kernel Extensions Folderkext
Keyboard Layouts Folderklay
Keychain Folderkchn
Launcher Items Folderlaun
MIDI Drivers Foldermidi
Mac OS ReadMe Files Foldermorƒ
Managed Items Foldermang
Modem Scripts Folderƒmod
Movie Documents Foldermdoc
Multiprocessing Foldermpxf
Music Documents Folderdoc
Open Doc Editors Folderƒodf
Open Doc Folderodod
Open Doc Libraries Folderodlb
Open Doc Shell PlugIns Folderodsp
Picture Documents Folderpdoc
Preferences Folderpref
Print Monitor Docs Folderprnt
Printer Description Folderppdf
Printer Driver Folderƒprd
Printers Folderimpr
Printing PlugIns Folderpplg
Private Frameworks Folderpfrm
Public Folderpubb
Quick Time Components Folderwcmp
Quick Time Extensions Folderqtex
Recent Applications Folderrapp
Recent Documents Folderrdoc
Recent Servers Folderrsvr
Scripting Additions Folderƒscr
Scripts Folderscrƒ
Shared Libraries Folderƒlib
Shutdown Foldershdf
Shutdown Items Disabled FoldershdD
Sound Sets Foldersnds
Speakable Items Folderspki
Speech Folderspch
Startup Folderstrt
Startup Items Disabled FolderstrD
Stationery Folderodst
System Control Panel Foldersctl
System Desktop Foldersdsk
System Extension Disabled FoldermacD
System Foldermacs
System Preferences Foldersprf
System Sounds Folderssnd
System Trash Folderstrs
Temporary Foldertemp
Text Encodings Folderƒtex
Themes Folderthme
Trash Foldertrsh
User Specific Tmp Folderutmp
Utilities Folderutiƒ
Voices Folderfvoc
Volume Root Folderroot
Where To Empty Trash Folderempt

Note: some of the codes in the table above use the ƒ symbol. This is the character of code 196 (0xc4 in hexadecimal) in the MacRoman encoding. It corresponds to the U+0192 code-point in the Utf-8 Unicode encoding form. It is obtained from the keyboard by typing opt-f.

Note: Above list contains only the more commonly used folders. A complete list of codes together with further technical details may be found at


Here are some examples to demonstrate the use of the [getStandardFolder] command:

    Welcome to AlphaX's AlphaTcl shell.
     «MacOS» version
     AlphaX 8.1d1, Wednesday, 11 January 2006

     «MacOS» info command getStandardFolder

     «MacOS» getStandardFolder asup user
     /Users/bernardo/Library/Application Support/

     «MacOS» getStandardFolder asup local
     /Library/Application Support/

     «MacOS» getStandardFolder flnt user

     «MacOS» getStandardFolder -create flnt user
     /Users/bernardo/Library/Caches/Cleanup At Startup/

(add your comments here...)

Last updated 2006-04-23 10:07:01

Retrieved from
Page last modified on December 30, 2007, at 09:08 AM