win32api.GetTempFileName

tuple = GetTempFileName(path, prefix , nUnique )

Returns creates a temporary filename of the following form: path\\preuuuu.tmp.

Parameters

path : string

Specifies the path where the method creates the temporary filename. Applications typically specify a period (.) or the result of the GetTempPath function for this parameter.

prefix : string

Specifies the temporary filename prefix.

nUnique : int

Specifies an nteger used in creating the temporary filename. If this parameter is nonzero, it is appended to the temporary filename. If this parameter is zero, Windows uses the current system time to create a number to append to the filename.

Win32 API References

Search for GetTempFileName at msdn, google or google groups.

Return Value

The return value is a tuple of (string, int), where string is the filename, and rc is the unique number used to generate the filename.