Skip to: Site menu | Main content

Email LinkedIn

Blog...

Change Coldfusion Temporary Files Location Used by GetTempDirectory()

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}</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

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)