This is what I eventually got working. I suppose I could have combined
the three cfsets into one, but this was a bit easier to work with.

<!--- get the full directory path, but chop off the first three
characters "c:\" --->
<cfset dir = RemoveChars(GetDirectoryFromPath(GetTemplatePath()), 1, 3)>
<!--- remove the last string character --->
<cfset dir = Left(dir, Len(dir)-1)>
<!--- get the last list element --->
<cfset dir = listgetat(dir,Listlen(dir,"\"),"\")>
<!--- print the value --->
<cfoutput>#dir#</cfoutput>

Ex: starting with the raw path
"c:\directory1\directory2\directory3\filename.cfm" I get "directory3"
(the last directory name before the file name) which is what I needed.

Thanks to all who replied.

Chris Montgomery               [EMAIL PROTECTED]
:: Web development/Consulting  http://www.astutia.com ::
:: Allaire Consulting Partner/ NetObjects Reseller    ::
:: 210-490-3249/888-745-7603   Fax 210-490-4692       ::
:: Find a Job in San Antonio   http://www.sajobnet.com::

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to