SpecialFolderPath

Richard Gaskin ambassador at fourthworld.com
Fri Jan 21 13:17:23 CST 2005


Paul Salyers wrote:
> 
> 
> 
> the specialFolderPath of folderIdentifier
> specialFolderPath(folderIdentifier)
> 
> specialFolderPath("Preferences")
> set the defaultFolder to specialFolderPath("documents")
> put specialFolderPath("asup") into appSupportFolder -- special constant
> 
> 
> I need help one last time. :)
> 
> I found the above code on Rev doc-help section by searching for 
> "Special" but as usually no coding help!

Searching for specialFolderPath brought up this:

--------------
For OS X systems:
	Desktop: The user's Desktop folder
	System: The active System Folder
	Fonts: The system Fonts folder
	Preferences: The Preferences folder inside the user's Library folder

For Mac OS and OS X systems, you can also specify a four-character 
special folder constant as the folderIdentifier. You can find a list of 
these constants on the Apple web site at 
<http://developer.apple.com/techpubs/macosx/Carbon/Files/FolderManager/Folder_Manager/folder_manager_ref/constant_6.html#//apple_ref/c/tdef/FolderType>.

   Note:  Some special folder constants are meaningful only on Mac OS or 
only on OS X but not both. Not all special folder constants work on all 
system versions.

For Windows systems:
	Desktop: For icons on the desktop
	System: For system components
	Start: For items in the Start menu
	Documents: For user documents
	Fonts: For font storage
	Temporary: For storage of temporary files

For Windows systems, you can also specify a CSIDL number that identifies 
a special folder. You can find a list of available CDISL values on the 
Microsoft web site at 
<http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp>.

   Note:  The CSIDL numbers are provided in hexadecimal notation, so 
you'll need to use the baseConvert function to translate them into 
decimal numbers to use them with the specialFolderPath function. For 
example, the CSIDL number of the "My Music" folder is hexadecimal 
0x000d. The expression baseConvert("0x000d",16,10) is equal to 13, the 
number in decimal notation, so you use 13 as the folderIdentifier to 
obtain the location of the "My Music" folder.

   Note:   Not all CSIDL numbers work on all Windows versions.


-----------------


-- 
  Richard Gaskin
  Fourth World Media Corporation
  Developer of WebMerge: Publish any database on any Web site
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com


More information about the use-livecode mailing list