User Dir lazarus / 8-Other ---------------------------------------------------------------------- mrdebug · 2007-12-09 20:58 How to get user dir (cross platform function)? ---------------------------------------------------------------------- pch · 2007-12-10 14:55 I use the following that work for Windows, Linux, OS X and other Unix. Code: [Select] uses {$ifdef mswindows}   Windows, {$endif} .... function GetUserPath:string; {$ifdef mswindows} var PIDL : PItemIDList;     Folder : array[0..MAX_PATH] of Char; const CSIDL_APPDATA = $001A; {$endif} begin {$ifdef mswindows}   SHGetSpecialFolderLocation(0, CSIDL_APPDATA, PIDL);   SHGetPathFromIDList(PIDL, Folder);   result:=Folder; {$endif} {$ifdef unix}   result:=ExpandFileName('~/')); {$endif} end; If you prefer My Documents instead of Application Data use CSIDL_PERSONAL = $0005; ---------------------------------------------------------------------- mrdebug · 2007-12-10 22:00 Thank you very mutch! ---------------------------------------------------------------------- marcov · 2007-12-16 22:04 Have a look at sysutils.getappconfig