This should do it!

 

listLast(GetDirectoryFromPath(GetCurrentTemplatePath()),'/')

 

L.

 


From: James Buckingham [mailto:[EMAIL PROTECTED]
Sent: 05 April 2004 2:10 PM
To: '[EMAIL PROTECTED]'
Subject: [ cf-dev ] Current Directory

 

Afternoon guys,

 

Just a quick question today. How do I find out the current directory that my Cold Fusion file is currently sitting in.

 

For example, if I have a Cold Fusion file called test.cfm at the following address:

 

www.mysite.com/home/test.cfm

 

and I wanted to extract the folder name 'home' from here and insert it into my variable how would I do that?

 

Cheers in advance.

JamesB

Reply via email to