Is there a more efficient way to check if a directory exists than having to
do this,

I checked the FAQ but there is nothing on this.

<cfset error="">
<cfif isdefined("form.destination") AND form.destination eq 1 and
isdefined("form.folder") and form.folder neq "">
        <cfset checkAccount = Application.logVirtualRoot & "" & form.folder>
        <cftry>
                <cffile action="WRITE"
file="#Application.logVirtualRoot##form.cName#.txt" output="temp">
                <cfcatch type="Any">
                        <cfset error=1>
                </cfcatch>
        </cftry>
        <cfif error neq "">
                ..CREATE DIRECTORY....
        <cfelse>
                ..ELSE CONTINUE..
        </cfif>
</cfif>

Thank you in advance.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-community@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to