GetTempFile(dir, prefix)

Description

Creates and returns the name of a temporary file in a directory whose name starts with (at most) the first three characters of prefix.

Category

System functions

See also

GetTempDirectory

Parameters

Parameter
Description
dir
Directory name
prefix
Prefix of a temporary file to be created in the directory specified by dir

Example

<!--- This example uses GetTempDirectory to find the temporary
directory, and GetTempFile to place a dummy file in it --->
<html>
<head>
<title>
GetTempFile Example
</title>
</head>

<body>
<H3>GetTempFile Example</H3>

<P>The temporary directory for this
ColdFusion Server is <cfoutput>#GetTempDirectory()#</cfoutput>.
<P>We have created a temporary file called:
<cfoutput>#GetTempFile(GetTempDirectory(),"testFile")#</cfoutput>

</body>
</html>