<cfif DirectoryExists("c:\temp\test\")>
        <h4>Found</h4>
<cfelse>
        Create Directory...
</cfif>

_____________________________
steve oliver
senior internet developer
atnet solutions, inc.
http://www.atnetsolutions.com


-----Original Message-----
From: phumes1 [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 8:56 AM
To: CF-Talk
Subject: Re: <cfdirectory - Check to see if directory exists


Hi,

I want to check "MyDirectory.name" to see if a directory exists on the 
server and if not, create it.
The below code doesn't work. Whats the correct <cfif statement?

<cfdirectory directory="c:\temp\test" name="MyDirectory">
<cfif #MyDirectory.name# IS "test">
        <h4>Found</h4>
<cfelse>
        <h4>Not Found</h4>
        Create directory...
</cfif>


______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to