TempFileName

Description:

baTempFileName returns a temporary file name that is guaranteed not to exist.

Platforms:

Windows

Usage:

Result = baTempFileName( Prefix )

Arguments:

String.
Prefix is a string of up to 3 characters that is used to generate the filename.

Returns:

String.
Returns the file name, including the path.

Examples:

Director:
FileName = TempFileName( "gaz" )

Authorware:
FileName := TempFileName( "gaz" )
 

Notes:

The file name will consist of the path name, followed by the prefix, then a number, with a ".tmp" extension; eg "c:\temp\gaz12453.tmp"
An empty file with that name will be created.

The baTempFileName function gets the temporary file path as follows:
1.The path specified by the TMP environment variable.
2.The path specified by the TEMP environment variable, if TMP is not defined.
3.The current directory, if both TMP and TEMP are not defined.

Files created using file names returned by this function are not automatically deleted when Windows shuts down.