The specified directory attribute value C:\directory\to\create could not be created.

The most likely cause of this error is that C:\directory\to\create already exists on your file system. The exception occurred during a cfdirectory action="CREATE".

Sample code

<cfdirectory action="CREATE" directory="C:\directory\to\create">

Explanation

As the error states, the most likely cause is that the directory already exists.

First check to see if the directory exists before attempting to create it:

<cfif NOT DirectoryExists("C:\directory\to\create")>
    <cfdirectory action="CREATE" directory="C:\directory\to\create">
</cfif>

Submitted by Adrian Lynch on Tuesday 14 October 2008

Comments

Add a comment or subscribe to this error