- Code: Select all Expand view RUN
function cTempFile( cPath, cExtension ) // returns a temporary filename
local cFileName
static cOldName
DEFAULT cPath := "", cExtension := ""
if ! "." $ cExtension
cExtension = "." + cExtension
endif
while File( cFileName := ( cPath + LTrim( Str( GetTickCount() ) ) + cExtension ) ) .or. ;
cFileName == cOldName
end
cOldName = cFileName
return cFileName