So its the extra "\" thats causing the problem?

On Thu, 18 Sep 2003 14:10:30 +0200, Pascal Peters wrote:

> I don't understand exactly what you are trying to do here (not enough
> info), but if you want to match the exact directory in the list, you
> have to use ListFindNoCase(). You then still have the problem of the
> trailing backslash: there is one in dir and none in the list. You can
> add the backslashes in the list or write some code to ignore a trailing
> backslash in dir.
> 
> Ex.
> ListFindNoCase(SESSION.DisplayShowMe,REReplace(URLDecode(dir),"\\$",""))
> 
> -----Original Message-----
> From: Bushy [mailto:[EMAIL PROTECTED] 
> Sent: donderdag 18 september 2003 13:12
> To: CF-Talk
> Subject: re REPOST - Someone please help. Problem matching comparing
> variables and outputting results properly.
> 
> 
> Hi,
> 
> I'm having a problem displaying some directories. Below are two sample
> variables.
> 
> URLDecode(dir) = d:\reports\csl\
> 
> SESSION.DisplayShowMe =
> D:\reports\aclg,
> D:\reports\breg,
> D:\reports\cdir,
> D:\reports\cfam,
> D:\reports\chfl,
> D:\reports\cmtgl,
> D:\reports\cpen,
> D:\reports\cres,
> D:\reports\csl,
> D:\reports\csl\sgml\tse\tsed,
> D:\reports\csl\sgml\tse\tsem,
> D:\ed_depot
> 
> <cfif FindNoCase(URLDecode(dir),SESSION.DisplayShowMe)>
>       <cfoutput>
>       <tr>
>               <td class="dirlinks" align="right">#indent#</td>
>               <td valign="bottom" width="16" height="13">
>                       <a
> href="#cgi.script_name#?dir=#URLEncodedFormat(dir)##URLEncodedFormat(SES
> SION.stDirFileName[i])#\" class="dirlinks"
> alt="#SESSION.stDirFileName[i]#"><img 
> src="images/folder-closed.gif" border="0">&nbsp;</a>
>               </td>
>               <td valign="middle" width="100%">
>                       <!--- Display directory folders --->
>                       <a
> href="#cgi.script_name#?dir=#URLEncodedFormat(dir)##URLEncodedFormat(SES
> SION.stDirFileName[i])#\" class="dirlinks"
> alt="#SESSION.stDirFileName[i]#"> #SESSION.stDirFileName[i]#</a>
>               </td>
>       </tr>
>       </cfoutput>
> </cfif>
> 
> When I run the code above not all the subdirectories get listed within
> \reports\csl\. Only the SGML directory.
> 
> Why?
> 
> I know I'm checking for just an occurence but how can I do an "exact"
> match for 
> just "D:\reports\csl" only and not include D:\reports\csl\sgml\tse\tsed
> or D:\reports\csl\sgml\tse\tsem?
> 
> It's matching on the "sgml" and only listing that directory. I only want
> it to match up to the third "\" and NOTHING past.
> 
> How can I do this?
> 
> 
> 
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137452
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

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

Reply via email to