Posts

Showing posts with the label GetTempPath

How to get WINDOWS special directories path in Delphi?

Sometime we need some special directories path from Microsoft Windows system to store User data or to copy some files etc.  So we can get those folder paths in Delphi in several ways. In this blog I have tried to cover all the ways.  If I have left something please feel free to add comments. By using Windows API function SHGetFolderPath  Delphi provides SHGetFolderPath API function which helps us to get windows system folder paths. We need to use  ShlObj unit in uses clause. For more details about SHGetFolderPath please visit following link SHGetFolderPatch Here at following I have created a string function  GetSpecialFolderPath  using SHGetFOlderPath API function which will return all special Windows folder path as per  CSIDLFolder value. function GetSpecialFolderPath(CSIDLFolder: Integer): string; var    FilePath: array [0..MAX_PATH] of char; begin   SHGetFolderPath(0, CSIDLFolder, 0, 0, FilePath);   R...