Navigation: How To's and Troubleshooting > How to… >====== How to Get Special Folder locations ====== | |
There is built-in Template support
The Clarion and ABC template chains now include support for CSIDL folders for both INI and your application's data files.
The support for storing your INI file to CSIDL locations is found in the Global Properties > Actions > General dialog.
The support for redirecting your data files to a designated CSIDL location is found in the Global Properties > Actions > File Control dialog.
The templates allow you to store the INI and data files in a common CSIDL location, or if you prefer you can store your INI files in one CSIDL location and your data files in another.
All of the functionality is wrapped in a CLASS defined in SPECIALFOLDER.INC/CLW and EQUATEs for all the commonly known folders are located in CSIDL.EQU
To use the CSIDL support directly (without the templates):
PROGRAM
MAP
END
INCLUDE('CSIDL.EQU'),ONCE
INCLUDE('SPECIALFOLDER.INC'),ONCE
getCSIDLfolder SpecialFolder !create instance of the SpecialFolder CLASS
p1 CSTRING(Max_Length) !define some vars to hold the paths you need
p2 CSTRING(Max_Length) !
p3 CSTRING(Max_Length) !
CODE
p1 = getCSIDLfolder.GetDir(SV:CSIDL_PERSONAL)
p2 = getCSIDLfolder.GetDir(SV:CSIDL_APPDATA)
p3 = getCSIDLfolder.GetDir(SV:CSIDL_COMMON_DESKTOPDIRECTORY)
See Also: PATH, SETPATH, CSIDL Support, EXISTS