PROCEDURE GetUniqueFile( tcPrefix ) *!* This method creates a file with a .TMP extension in the system temporary directory *!* Returns the fully qualified path including file name. *!* *!* Pass a 3-character prefix to use for the temporary file names *!* DECLARE LONG GetTempFileName IN "kernel32" ; STRING lpszPath, ; STRING lpPrefixString, ; LONG wUnique, ; STRING lpTempFileName WITH THIS LOCAL lnReturn, lcTmpPath, lcTmpName, lcPrefix lcPrefix = IIF( EMPTY( tcPrefix ), "UNK", tcPrefix ) lcTmpName = REPLICATE( ' ', 576 ) lcTmpPath = .GetPath() lnReturn = GetTempFileName( lcTmpPath + .LastSubdir, lcPrefix, 0, @lcTmpName ) .LastFile= lcTmpName .LastPrefix = lcPrefix ENDWITH RETURN STRTRAN( lcTmpName, CHR(0), '' ) ENDPROC