getTempFile
Description
Creates a temporary file in a directory whose name starts with (at most) the first three characters of prefix.
Categories
Related
Syntax
GetTempFile(dir, prefix)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| dir | Directory name | ||
| prefix | Prefix of a temporary file to create in the dir directory |
Returns
Name
of a temporary file, as a string.
Example
<h3>GetTempFile Example</h3>
The temporary directory for this ColdFusion Server is
<cfoutput>#GetTempDirectory()#</cfoutput>.</p>
We have created a temporary file called:
<cfoutput>#GetTempFile(GetTempDirectory(),"testFile")#</cfoutput></p>