Blog

Change Coldfusion Temporary Files Location Used by GetTempDirectory()

November 2, 2010

I wanted to change the default location Coldfusion uses for temporary storage when using:

<cffile action="upload">

This meant changing the default location returned by GetTempDirectory()

EDIT %CFusion%\runtime\servers\coldfusion\SERVER-INF\jrun.xml
Comment this line:

<attribute name="temporaryDirectory">{jrun.server.rootdir}/SERVER-INF/temp</attribute>

Add this key:

<attribute name="temporaryDirectory">{YourFullTempFolderPath}$lt;/attribute>

So that you have this:

<!-- <attribute name="temporaryDirectory">{jrun.server.rootdir}/SERVER-INF/temp</attribute> -->
<attribute name="temporaryDirectory">C:\ExampleCustomTempPath</attribute>

RESTART the Coldfusion Application service

NOTE: Coldfusion will create a subfolder in the temporary directory named wwwroot-tmp

0 Comments

Leave Your Comment

Your email address will not be published. Required fields are marked *


about me

An information technology professional with twenty four years experience in systems administration, computer programming, requirements gathering, customer service, and technical support.