===== GET_SPECIAL_FOLDER Function ===== ==== Description ==== Returns the path for a "special" Windows directory, such as the directory to use for temporary files, or the user's "My Documents" directory and so on. ==== Syntax ==== SuccessFlag = Get_Special_Folder( FolderID ) ==== Parameters ==== ^Name ^Required^Description^ |FolderID|Yes |A string specifying the special folder to return. Can be one of the following (case-insensitive):\\ \\ * APPDATA\\ * COMMON_APPDATA\\ * DESKTOP\\ * LOCAL_APPDATA\\ * PERSONAL\\ * MY_DOCUMENTS\\ * PROGRAM_FILES\\ * PROGRAM_FILES_X86\\ * WINDOWS\\ * SYSTEM| ==== Returns ==== The return value is the fully qualified path to the special folder. Error details are returned via the Set_Status() stored procedure. ==== Remarks ==== The GET_SPECIAL_FOLDER procedure is essentially a wrapper around the SHGetSpecialFolderPath Windows API function, so it is worth examining the documentation for this on the Microsoft website to get a better idea of the capabilities of this method. This stored procedure can be executed outside of Event Context. When accessing special directories from within Event Context then consider using the FILESYSTEM object [[guides:oi10:presentation_server:getspecialdir_method_filesystem|GETSPECIALDIR]] method instead. ==== Example ==== // Example use of GET_SPECIAL_FOLDER // Declare Function Get_Special_Folder, Get_Status $Insert RTI_SSP_Equates // Get the location of the user’s "My Documents" folder // MyDocsFolder = Get_Special_Folder( "MY_DOCUMENTS" ) If Get_Status( ErrText ) Then // Handle Err...// End ==== See Also ==== [[guides:oi10:presentation_server:filesystem_object|FILESYSTEM]] object, [[guides:programming:programmers_reference_manual:iseventcontext|IsEventContext]], [[guides:programming:programmers_reference_manual:get_status|GET_STATUS()]], [[guides:programming:programmers_reference_manual:set_status|SET_STATUS()]] stored procedures.