Simplest? Remove the stuff you don't want: <cfset rootpath="C://InetPub/wwwroot/MySite/"> <cfset path=Replace(path,rootpath,"")>
> -----Original Message----- > From: Jeff Small [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 1:48 PM > To: CF-Talk > Subject: GetDirectoryFromPath(?) or something else? Or a > marriage of it > and something else? > > > Okay, if you read my previous post about Verity results, it > appears that the > problem I'm encountering isn't so much a verity problem, it's a CF > Function/CF problem. > > I'm trying to extract the directory information from a path > and I'm running > head first into all kinds of problems. > > My verity results are returning a "key" value. Whenever I use > GetFileFromPath(key) I can extract the file correctly, as one > would expect. > The only problem is that I need to determine if the file sits > in a directory > below the root (it probably will as the root only has two or > three files and > the majority of the site sits in at least one subdirectory) > > In other words, how do I return > <A HREF="C://InetPub/wwwroot/MySite/foo/index.cfm">View Me</A> > <A HREF="C://InetPub/wwwroot/MySite/index.cfm">View Me</A> > > as > > <A HREF="foo/index.cfm">View Me</A> > <A HREF="index.cfm">View Me</A> > > If the search matched those two pages? > > As it is now, best I can accomplish is: > <A HREF="index.cfm">View Me</A> > <A HREF="index.cfm">View Me</A> > > Using GetFileFromPath(key) > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

