House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

CFFILE APPEND at the beginning

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

CFFILE APPEND at the beginning

Thanks a lot, CFDEV 06/01/2004 11:32 AM
<cfset crlf = chr(13) & chr(10)> Pascal Peters 06/01/2004 11:26 AM
Prepending to a file involves reading and rewriting the file.  CFFILE Katz, Dov B (IT) 06/01/2004 11:19 AM
Hi all, CFDEV 06/01/2004 11:13 AM

06/01/2004 11:32 AM
Author: CFDEV Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32904#165126 Thanks a lot, I tought of that but I was sonwdering if there was something I missed in the append attributes to facilitate the manipulation... Thank you Pat   _____ Sent: June 1, 2004 11:21 To: CF-Talk Subject: RE: CFFILE APPEND at the beginning <cfset crlf = chr(13) & chr(10)> <cffile action="READ" file="#variables.file#" variable="out"> <cfset out = "my line here" & crlf & variables.out> <cffile action="WRITE" file="#variables.file#" output="#variables.out#" addnewline="No"> Of course, this requires reading the whole file. If you are on cfmx, maybe this can be done in java? Pascal ----- Excess quoted text cut - see Original Post for more -----   _____  
06/01/2004 11:26 AM
Author: Pascal Peters Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32904#165124 <cfset crlf = chr(13) & chr(10)> <cffile action="READ" file="#variables.file#" variable="out"> <cfset out = "my line here" & crlf & variables.out> <cffile action="WRITE" file="#variables.file#" output="#variables.out#" addnewline="No"> Of course, this requires reading the whole file. If you are on cfmx, maybe this can be done in java? Pascal ----- Excess quoted text cut - see Original Post for more -----
06/01/2004 11:19 AM
Author: Katz, Dov B (IT) Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32904#165120 Prepending to a file involves reading and rewriting the file.  CFFILE read, and CFFILE write with #newstring# newline #existing file# But if it's a one time thing, you might want to do this dynamically when you output the file by outputting the "header" line before the file content. HTH -dov   _____ Sent: Tuesday, June 01, 2004 11:11 AM To: CF-Talk Subject: CFFILE APPEND at the beginning Hi all, The cffile append function append a document at the end..how could I insert a line at the beginning instead? Thanks Pat   _____  
06/01/2004 11:13 AM
Author: CFDEV Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32904#165119 Hi all, The cffile append function append a document at the end..how could I insert a line at the beginning instead? Thanks Pat
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference