Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DirectoryExists command refuses to work...

Status
Not open for further replies.

TeaAddictedGeek

Programmer
Apr 23, 1999
271
0
0
US
...and I'm fresh out of ideas.<br>
<br>
Here's the code:<br>
<br>
<br>
&lt;cfif DirectoryExists(#source.s_path#) IS "Yes"&gt;<br>
blah blah blah copy dir blah blah blah<br>
&lt;cfelse&gt;<br>
Sorry, the directory doesn't exist.<br>
&lt;/cfif&gt;<br>
<br>
source.s_path *works*, there's nothing wrong with that variable whatsoever. The code within the cfif statement was there to begin with, and outputs with no probs.<br>
<br>
Here's the exact error statement I get:<br>
<br>
---<br>
Error Diagnostic Information<br>
An error has occurred while processing the expression:<br>
<br>
DirectoryExists(#source.s_path#) IS "Yes<br>
<br>
The error occurred on (or near) line 50 of the template file trigger_copy.cfm.<br>
<br>
46: &lt;/center&gt;&lt;P&gt;<br>
47: &lt;cfif d_id is " "&gt;<br>
48: &lt;cfabort&gt;<br>
49: &lt;/cfif&gt;<br>
50: <br>
51: &lt;cfif DirectoryExists(#source.s_path#) IS "Yes"&gt;<br>
52: &lt;cfif DirectoryExists(#source.d_path#) IS "Yes"&gt;<br>
<br>
There is no Cold Fusion function named DirectoryExists. Check the spelling of the function name in the Cold Fusion documentation.<br>
---<br>
<br>
<br>
Please help! I *know* that this command exists; I looked it up myself. I'm using SQL Server 7.0. <br>
<br>
Am I using it incorrectly somehow?<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>

 
Try the following syntax - it's worked well with my apps that use the cfif:<br>
&lt;cfif DirectoryExists(source.s_path) is "yes"&gt;<br>
Good Luck
 
Or even try to put the quotes inside the brakets like so:<br>
<br>
&lt;cfif DirectoryExists('#source.s_path#') is "yes"&gt;<br>
<br>
<br>

 
Thanks anyway, guys... but I long found out the answer when I did a version query.<br>
<br>
<br>
I'm running 3.0. The tag is for 4.0. *sighs*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top