There are functions available to do this for you...

getdirectoryfrompath(path) - Extracts a the full directory (including \)
from a full path and filename.

getfilefrompath(path) - Extracts the filename from a full path and filename.

-Justin Scott, Lead Developer
 Sceiron Internet Services, Inc.
 http://www.sceiron.com


----- Original Message -----
From: "phumes1" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, October 18, 2001 11:16 AM
Subject: Re: String manipulation


> Hi,
>
> I would like to split the following line into two strings. The length or
> contents of the string can vary depending on the directory structure.
> Basically, I need to extract the directory path into one variable and the
> filename in another.
>
> Example:
>
> <cfoutput>URL.filename</cfoutput> in my template generates the line below.
>
> D:\books\aosl\act_text.dat
>
> I need to extract the above into two variables.
>
> var1 = D:\books\aosl
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to