I'm trying to get the name of the directory that houses template. The problem is that I just need the directory's name.
For example, given the actual path:
C:\whatever\whateverElse\myDirectory\myTemplate
I need to extract the directory's name (myDirectory) into a variable.
I have been able to do it by using
<cfset myDirectory=REReplace(cgi.script_name,"/[^/]*$","")>
<cfoutput>#ListLast(myDirectory, "/")#</cfoutput>
but wondered if there is a simpler or better way of doing the same.
thanks!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

