#DEFINE MAX_PATH 260 DECLARE INTEGER GetTempPath IN kernel32; INTEGER nBufferLength, STRING @lpBuffer DECLARE INTEGER GetLongPathName IN kernel32; STRING lpszShortPath, STRING @lpszLongPath, INTEGER cchBuffer ? GetLongTempPath() FUNCTION GetLongTempPath LOCAL cPath, cLongPath, nBufsize cPath = Repli(Chr(0),MAX_PATH) cLongPath = Repli(Chr(0),MAX_PATH*2) nBufsize = GetTempPath(Len(cPath), @cPath) cPath = LEFT(cPath, nBufsize) = GetLongPathName(cPath, @cLongPath, Len(cLongPath)) RETURN SUBSTR(cLongPath, 1,AT(Chr(0),cLongPath)-1)