@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.
Dec | Hex | Name | Returns: |
0 | 0x00 | CSIDL_DESKTOP | the desktop |
2 | 0x02 | CSIDL_PROGRAMS | the user’s “Programs” menu |
5 | 0x05 | CSIDL_PERSONAL | the user’s “Documents” folder |
6 | 0x06 | CSIDL_FAVORITES | the user’s “Favorites” folder |
7 | 0x07 | CSIDL_STARTUP | the user’s “Startup” programs folder |
8 | 0x08 | CSIDL_RECENT | shortcuts to the user’s recently opened files |
9 | 0x09 | CSIDL_SENDTO | the user’s “Send To” shortcuts |
11 | 0x0b | CSIDL_STARTMENU | the user’s Start menu |
13 | 0x0d | CSIDL_MYMUSIC | the user’s “Music” folder |
14 | 0x0e | CSIDL_MYVIDEO | the user’s “Videos” folder |
16 | 0x10 | CSIDL_DESKTOPDIRECTORY | the user’s Desktop folder |
19 | 0x13 | CSIDL_NETHOOD | the user’s network shortcuts |
20 | 0x14 | CSIDL_FONTS | the system fonts directory |
21 | 0x15 | CSIDL_TEMPLATES | the user’s templates folder |
22 | 0x16 | CSIDL_COMMON_STARTMENU | Start menu for all users |
23 | 0x17 | CSIDL_COMMON_PROGRAMS | “Programs” menu for all users |
24 | 0x18 | CSIDL_COMMON_STARTUP | “Startup” programs folder for all users |
25 | 0x19 | CSIDL_COMMON_DESKTOPDIRECTORY | Desktop folder for all users |
26 | 0x1a | CSIDL_APPDATA | the user’s application data folder |
27 | 0x1b | CSIDL_PRINTHOOD | the user’s printer shortcuts |
28 | 0x1c | CSIDL_LOCAL_APPDATA | the user’s local applications data |
29 | 0x1d | CSIDL_ALTSTARTUP | the user’s nonlocalized Startup folder |
30 | 0x1e | CSIDL_COMMON_ALTSTARTUP | nonlocalized Startup folder for all users |
31 | 0x1f | CSIDL_COMMON_FAVORITES | “Favorites” folder for all users |
32 | 0x20 | CSIDL_INTERNET_CACHE | the user’s Internet Explorer cache |
33 | 0x21 | CSIDL_COOKIES | the user’s Internet Explorer cookies |
34 | 0x22 | CSIDL_HISTORY | the user’s Internet Explorer history |
35 | 0x23 | CSIDL_COMMON_APPDATA | application data for all users |
36 | 0x24 | CSIDL_WINDOWS | the Windows directory |
37 | 0x25 | CSIDL_SYSTEM | the Windows system directory |
38 | 0x26 | CSIDL_PROGRAM_FILES | default location for applications |
39 | 0x27 | CSIDL_MYPICTURES | the user’s “Pictures” folder |
40 | 0x28 | CSIDL_PROFILE | the user’s profile directory |
41 | 0x29 | CSIDL_SYSTEMX86 | x86 system directory on x64 Windows |
42 | 0x2a | CSIDL_PROGRAM_FILESX86 | x86 applications on x64 Windows |
43 | 0x2b | CSIDL_PROGRAM_FILES_COMMON | shared application components |
44 | 0x2c | CSIDL_PROGRAM_FILES_COMMONX86 | shared x86 app components on x64 Windows |
45 | 0x2d | CSIDL_COMMON_TEMPLATES | templates folder for all users |
46 | 0x2e | CSIDL_COMMON_DOCUMENTS | documents folder for all users |
47 | 0x2f | CSIDL_COMMON_ADMINTOOLS | “Administrative tools” folder for all users |
48 | 0x30 | CSIDL_ADMINTOOLS | the user’s “Administrative tools” folder |
53 | 0x35 | CSIDL_COMMON_MUSIC | “Music” folder for all users |
54 | 0x36 | CSIDL_COMMON_PICTURES | “Pictures” folder for all users |
55 | 0x37 | CSIDL_COMMON_VIDEO | “Video” folder for all users |
56 | 0x38 | CSIDL_RESOURCES | the system resources directory |
59 | 0x3b | CSIDL_CDBURN_AREA | used for burning CDs |