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() > *!* Pass the directory to create the temporary filename in, the prefix to use, 0, and a variable to contain the created file name. > lnReturn = GetTempFileName( lcTmpPath + .LastSubdir, lcPrefix, 0, @lcTmpName ) > .LastFile = lcTmpName > .LastPrefix = lcPrefix > ENDWITH > RETURN TRIM( STRTRAN( lcTmpName, CHR(0), '' ) ) >ENDPROC