Try <cfif ListFindNoCase(URLDecode(dir),"\data", "\")>

Note the "\" at the end of the function call. This tells the function to
delimit the list on a \.
In your code <cfif ListFindNoCase(URLDecode(dir),"\data")>, since you aren't
specifying a delimter, it defaults to a "," which when using
"C:\temp\test\data\123\" is a one element list.

Get it?

Mike Wallick
* Web Application Developer
* [EMAIL PROTECTED]
* 651.628.5377
* http://www.securecomputing.com/


-----Original Message-----
From: phumes1 [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 20, 2002 12:55 PM
To: CF-Talk
Subject: <cfif... not working properly?


Hi,

In this example the results from my #URLDecode(dir)# is
"C:\temp\test\data\123\"

I'm trying to check is the directory "data" exists in the variable and if
so, do something else. The syntax below is not working properly. What am I
doing wrong?

                        <cfif ListFindNoCase(URLDecode(dir),"\data")>
                                <h5>You are in the data directory</h5>
                        <cfelse>
                                             <h5>You are somewhere else</h5>
                        </cfif>




______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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