Word of warning:
There are two functions...
getTemplatePath()
getCurrentTemplatePath()
If I remember right one of these returns the path in ALL CAPS when used on a
Unix machine, the other one does not. I don't remember which is which...
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
-----Original Message-----
From: Bryan Love [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 3:58 PM
To: CF-Talk
Subject: RE: Directory Name
good one
why not make it work on Windows and Unix... Just add a "/" next to the
"\"...
<cfset MyDirectory=ListLast(GetDirectoryFromPath(GetCurrentTemplatePath()),
"\/")>
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
-----Original Message-----
From: Tyler Silcox [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 3:01 PM
To: CF-Talk
Subject: Re: Directory Name
Howabout:
<cfset MyDirectory=ListLast(GetDirectoryFromPath(GetCurrentTemplatePath()),
"\")>
Is that what you are talking about?
Tyler Silcox
email | [EMAIL PROTECTED]
----- Original Message -----
From: "Tony Gruen" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, May 10, 2002 5:43 PM
Subject: Directory Name
Hello List members,
I am trying to set the current directory name as a local variable. Just the
dir name mind you, not the full path. The directory names within the app
will be varying lengths but always at the end of teh same tree.
for example
D:\webroot\accounts\8888 would have a local variable in the application.cfm
of 8888
D:\webroot\accounts\528004-4 would have a local variable int he
application.cfm of 528004-4
I have been trying to creatively devise a way to use CFDIRECTORY to do this
but I have only been able to work myself up into a mind knot. Has anyone had
to do this? Any insight? I would greatly appresiate any input.
Tony Gruen
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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