yeah. how bout i read your message first. nevermind. -----Original Message----- From: Ryan Emerle Sent: Tuesday, March 25, 2003 5:00 PM To: CF-Talk Subject: RE: Dynamically Getting Current Directory (Is There A Better Way To Code This?)
expandPath('.')? -R -----Original Message----- From: Mike Alberts [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 4:57 PM To: CF-Talk Subject: Dynamically Getting Current Directory (Is There A Better Way To Code This?) 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4