@SHFOLDER — Returns the full pathname of a Windows special folder.

Syntax:
@SHFOLDER[n]

This function works much the same as the internal function of the same name. However, it can accept the index n as decimal, hexadecimal, or a descriptive CSIDL name. Also, error checking is tighter; if you pass this @SHFOLDER something it doesn’t understand, it will complain.

Not all values of n refer to actual directories, and not all values are supported under all versions of Windows. If you pass a value which doesn’t work on your system, this function will return an empty string.

When using the symbolic names, case is not significant, spaces and underscores are ignored, and you may omit the leading CSIDL_; “My Music” is equivalent to CSIDL_MYMUSIC.


DecHexNameReturns:
00x00CSIDL_DESKTOPthe desktop
20x02CSIDL_PROGRAMSthe user’s “Programs” menu
50x05CSIDL_PERSONALthe user’s “Documents” folder
60x06CSIDL_FAVORITESthe user’s “Favorites” folder
70x07CSIDL_STARTUPthe user’s “Startup” programs folder
80x08CSIDL_RECENTshortcuts to the user’s recently opened files
90x09CSIDL_SENDTOthe user’s “Send To” shortcuts
110x0bCSIDL_STARTMENUthe user’s Start menu
130x0dCSIDL_MYMUSICthe user’s “Music” folder
140x0eCSIDL_MYVIDEOthe user’s “Videos” folder
160x10CSIDL_DESKTOP­DIRECTORYthe user’s Desktop folder
190x13CSIDL_NETHOODthe user’s network shortcuts
200x14CSIDL_FONTSthe system fonts directory
210x15CSIDL_TEMPLATESthe user’s templates folder
220x16CSIDL_COMMON_­STARTMENUStart menu for all users
230x17CSIDL_COMMON_­PROGRAMS“Programs” menu for all users
240x18CSIDL_COMMON_­STARTUP“Startup” programs folder for all users
250x19CSIDL_COMMON_­DESKTOP­DIRECTORYDesktop folder for all users
260x1aCSIDL_APPDATAthe user’s application data folder
270x1bCSIDL_PRINTHOODthe user’s printer shortcuts
280x1cCSIDL_LOCAL_­APPDATAthe user’s local applications data
290x1dCSIDL_ALTSTARTUPthe user’s nonlocalized Startup folder
300x1eCSIDL_COMMON_­ALTSTARTUPnonlocalized Startup folder for all users
310x1fCSIDL_COMMON_­FAVORITES“Favorites” folder for all users
320x20CSIDL_INTERNET_­CACHEthe user’s Internet Explorer cache
330x21CSIDL_COOKIESthe user’s Internet Explorer cookies
340x22CSIDL_HISTORYthe user’s Internet Explorer history
350x23CSIDL_COMMON_­APPDATAapplication data for all users
360x24CSIDL_WINDOWSthe Windows directory
370x25CSIDL_SYSTEMthe Windows system directory
380x26CSIDL_PROGRAM_­FILESdefault location for applications
390x27CSIDL_MYPICTURESthe user’s “Pictures” folder
400x28CSIDL_PROFILEthe user’s profile directory
410x29CSIDL_SYSTEMX86x86 system directory on x64 Windows
420x2aCSIDL_PROGRAM_­FILESX86x86 applications on x64 Windows
430x2bCSIDL_PROGRAM_­FILES_­COMMONshared application components
440x2cCSIDL_PROGRAM_­FILES_­COMMONX86shared x86 app components on x64 Windows
450x2dCSIDL_COMMON_­TEMPLATEStemplates folder for all users
460x2eCSIDL_COMMON_­DOCUMENTSdocuments folder for all users
470x2fCSIDL_COMMON_­ADMINTOOLS“Administrative tools” folder for all users
480x30CSIDL_ADMINTOOLSthe user’s “Administrative tools” folder
530x35CSIDL_COMMON_­MUSIC“Music” folder for all users
540x36CSIDL_COMMON_­PICTURES“Pictures” folder for all users
550x37CSIDL_COMMON_­VIDEO“Video” folder for all users
560x38CSIDL_RESOURCESthe system resources directory
590x3bCSIDL_CDBURN_­AREAused for burning CDs