ColdFusion - How to create a temporary file in a directory

GetTempFile() - create a temporary file in a directory

GetTempFile.cfm


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GetTempFile function example: how to create a temporary file in a directory</title>
</head>

<body>
<h2 style="color:Crimson">GetTempFile Function Example</h2>

<cfoutput>
<b>Temporary Directory:</b> #GetTempDirectory()#
<br />
<b>Craete a Temporary File:</b> #GetTempFile(GetTempDirectory(),"TestTempFile")#
</cfoutput>
</body>
</html>






More ColdFusion examples