Hi,

I want to be able to replace some text within a variable with the code below:

The return string of url.filename in this example is 
"d:\directory1\sub-directory1\filename.dat"

#url.filename#

<cfset FileName = ListLast(url.filename, "\")>
<cfset DirPath = Left(url.filename, Evaluate(Len(url.filename) - 
len(FileName) - 1))>

FileName = "filename.dat"
DirPath = "d:\directory1\sub-directory1

I am then passing the results to the following <BODY tag. I need to replace 
the DirPath with "file:\\z:" Presently this is
hard-coded in.

<body onLoad="document.location.href = 'file:\\z:/sub-directory1/#FileName#';">
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
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