You're pretty much on your own.  CFFILE provides just simple means of
modifying and working with files within the file system.  For fixed width
columns, I usually use the LeftJustify() function, something like:

<cfset s = "">

<!--- Loop: add one line per iteration --->
<cfloop ...>
  <cfset s = s & LJustify(first_field, 45)#>
  <cfset s = s & LJustify(second_field, 20)#>
  <cfset s = s & LJustify(third_field, 32)#>
  <cfset s = s & LJustify(fourth_field, 50)#>
  <cfset s = s & Chr(13) & Chr(10)>
</cfloop>

<cffile action="write" file="c:\whatever" output="#s#" addnewline="no">


If the file is relatively small, construct the whole file in memoroy
whithin a variable, as shown above.  If you're writing a multi-megabyte
file, you can use <cffile action="append" > and append one or ten or fifty
(or whatever) lines at a time, so that the memory requirements of the
template are less.

Jim



-----Original Message-----
From: Marlene Buffa <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, May 26, 2000 10:06 AM
Subject: CFFILE question


How do we do the following:
Create a fixed ASCII text file with <CFFILE>.

How do you specify  the picture or format length for a given
column?

marlene

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to