> In the following code, the source file ends with a CR/LF
> sequence. There are
> no blank lines. The resulting file which the user
> downloads (right clicks on
> the link that calls this code and picks save) has an extra
> CR/LF creating a
> blank line. It puzzles me that the file would get modified
> in this process.

> The file is copied from the file server to the local
> c:\drive on the
> webserver and then downloaded to the user.

> Here's the code:

> <CFFile action="COPY" source="#fname2#"
> destination="c:\temp\#fname#">
> <CFContent type="text/plain" file="c:\temp\#fname#"
> deletefile="Yes">

> Any help would be appreciated.

I'm not certain about the added carriage return -- my gut feeling is to say that the 
original file has an extra at the bottom as a result of it being appended to with 
<cffile action="append"> in other bits of code elsewhere... or possibly <cffile 
action="write">... using cffile to write or append to files always seems to require a 
bit of tweaking the whitespacer monster... You could of course simply read the file 
and then output the content instead as so:

<cffile action="read" file="#fname2#" variable="temp">
<cfcontent type="text/plain">
<cfoutput>#trim(temp)#</cfoutput><cfabort>

This will likely process faster as well and won't ever leave extra files in that temp 
folder if something stops working in the middle.

s. isaac dealey                972-490-6624

new epoch                      http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

tapestry api is opensource     http://www.turnkey.to/tapi

team macromedia volunteer      http://www.macromedia.com/go/team

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
                                

Reply via email to