ty the directoryexists() function.
~Simon
Simon Horwith
Macromedia Certified Instructor
Certified Advanced ColdFusion 5 Developer
Fig Leaf Software
1400 16th St NW, # 500
Washington DC 20036
202.797.6570 (direct line)
www.figleaf.com
-----Original Message-----
From: John McCosker [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 10:48 AM
To: CF-Community
Subject: CFDIRECTORY
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists