User Guide
GetTempDirectory 505
GetTempDirectory
Description
Gets the path of the directory that ColdFusion uses for temporary files. The directory depends on
the account under which ColdFusion is running and other factors. Before using this function in
an application, test to determine the directory it returns under your account.
Returns
The absolute pathname of a directory, including a trailing slash, as a string.
Category
System functions
Function syntax
GetTempDirectory()
See also
GetTempFile
History
ColdFusion MX: Changed behavior: on Windows, this function now returns the temporary
directory of the embedded Java application server. On other platforms, it returns the temporary
directory of the operating system.
Example
<h3>GetTempDirectory 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>