Hello all,

ColdFusion 5.

I have this code in my index.cfm files in directories throughout my sites 
that sets the value of a variable to the name of the directory that the file 
is in (just the name with no slashes and backslashes, etc)

cfset Request.ThisDirectory = 
ListLast(Replace(GetDirectoryFromPath(GetCurrentTemplatePath()),"/","\","all"),'\')

This code works fine and lets me use it on both Windows and Linux boxes 
without changing it. But my question is, is there a better way to do it 
(that works on both platforms)?

Case and special characters are not an issue as I always name my directories 
all lower case and no special characters.

Thanks for any input.

Mike



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to