Thanks for the tip, Dave, but when I set up the application
variables using forward slashes, as in:

<cfset application.temp_images_directory = 'e:/inetpub/webroot/tempImages' />

When I use that variable with a variable for a file in the news.cfc, like this:

#application.temp_images_directory#.#newFileName#.#originalFileExt#

I'd end up with:

e:\/inetpub\/webroot\/tempImages\/duck.jpg

instead of the usual:

e:\\inetpub\\webroot\\tempImages\\duck.jpg

if I used forward slashes when the path variable is created.

Just doesn't make sense. Can't figure out where the extra \ is being inserted.




> If I create this variable in application.cfc:
> <cfset application.temp_images_directory = 'e:\inetpub\webroot\tempImages' />
>
> and use it in news.cfc like this:
> <cfset saveNewsItemStruct = structNew()>
> <cfset saveNewsItemStruct.ATID = '#application.temp_images_directory#' />
>
> why in the WORLD would I get this:
> e:\\inetpub\\webroot\\tempImages
>
> when I return the struct and display saveNewsItemsStruct.ATID?????
>
> Why are the path lines doubling?
>
> I don't think I've seen this in 15 years of CF programming!
> (I'm getting too old for all this aggravation...)

I don't know what's causing this specific problem, but you can work
around it pretty easily by using forward slashes instead of
backslashes. Forward slashes work fine with file paths on Windows,
when used from CF.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355009
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to