version 11.4 (Modified)
System folder {(type)} String
| Parameter | Type | Description | |
| type | Longint | Type of system folder | |
| Function result | String | Pathname to a system folder |
Description
The System folder command returns the pathname to a particular folder of the operating system or to the active Windows or Mac OS System folder itself.
You pass in the optional type parameter a value indicating the type of system folder. 4D provides you with the following predefined constants, placed in the "System Folder" theme:
| Constant | Type | Value |
| System | Long Integer | 0 |
| Fonts | Long Integer | 1 |
| User Preferences_All | Long Integer | 2 |
| User Preferences_User | Long Integer | 3 |
| Startup Win_All | Long Integer | 4 |
| Startup Win_User | Long Integer | 5 |
| Start Menu Win_All | Long Integer | 8 |
| Start Menu Win_User | Long Integer | 9 |
| System Win | Long Integer | 12 |
| System32 Win | Long Integer | 13 |
| Favorites Win | Long Integer | 14 |
| Desktop | Long Integer | 15 |
| Applications or Program Files | Long Integer | 16 |
Notes:
The constants suffixed Win can be used on Windows only. When they are used on Mac OS, System folder will return an empty string.
The pathnames to some system folders can specific to the current user. Constants 2 to 9 allow you to choose whether you want to obtain the pathname to a folder which is shared by all users, or customized for the current user.
If you omit the type parameter, the function will return the pathname to active System folder (= constant System).
See Also
Get 4D folder, Temporary folder.