>I have session variable that contains the directory > name "session.strFileName". I also have another session > variable "session.ShowMe" that contains multiple directory > names (comma-delimited) which i'm setting from my database. > Basically, i need to check if the > directory "session.strFileName" exists in the > variable "session.showme". > >Example: > >session.strfilename = 'mywork' > >session.showme = 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2'
If you always know that it's going to be "c:\temp\" and then whatever session.strfilename is, you can just do this: <cfif ListFindNoCase(session.showme,"c:\temp\" & session.strfilename,",")> Here is is! <cfelse> Not found </cfif> -------------------------------- Scott Brady http://www.scottbrady.net/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm