but I do need a new line after each interation of the outer for loop? I have two loops, the outer list is delimited with [EMAIL PROTECTED] I'm looping through the list within this list to create a comma separated list. I want the final data to be stored something like this:

ListItem1:10099, PS2/162, 253, U, , BAY19
ListItem2:10100, PS3/162, 254, U, , BAY29

etc. I hope this makes sense

> I believe it's:


>
> <CFFILE ACTION=""> > FILE="employerNew.txt"
> ADDNEWLINE="Yes"
> OUTPUT="#newlinetmp#">


>
> set ADDNEWLINE="No"


>


>
>
> addNewLine
> Optional
> Yes
>
> * Yes: appends newline character to text written to file
>
> -----Original Message-----
> From: cf coder [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 02, 2004 9:35 AM
> To: CF-Talk
> Subject: how to get rid of the new line character
>
>
> hi guys I'm hoping someone can help me. I'm reading a
> text file
> <cffile
> action=""> > file="employer.txt"
> variable="fOutput">
>
> Looping through the text file, I've set the list
> delimter to be "[EMAIL PROTECTED]".
> <cfloop list="#fOutput#" index="fileLine"
> delimiters="[EMAIL PROTECTED]">
>
> I have a inner loop which loops through each
> individual listItem, the list delimeter is a new line
> (Chr(10)).I'm replacing all carriage returns with a
> comma and appending the result to a new file.
> <cfloop list="#fileLine#" index="newLine"
> delimiters="#Chr(10)#">
> <cfif Find("#Chr(13)#",newLine)>
> <cfset newlinetmp =
> Replace(newLine,"#Chr(13)#",",","All")>
> <cfoutput>#newlinetmp#</cfoutput>
> <CFFILE ACTION=""> > FILE="employerNew.txt"
> ADDNEWLINE="Yes"
> OUTPUT="#newlinetmp#">
> </cfif>
> </cfloop>
> </cfloop>
>
> The problem is the way it stores the result back to
> the text file. I want each list item to be comma
> separated for example like this
>
> ListItem 1:
> 10099,PS2/162,253,U,,BAY19,SCAR,,01/01/1980,0,,,,,,43525,,,,,NCA150347,,
> 0,N,05/01/1993,24,Y
> ListeItem 2: and so on
>
> But it currently saves it back like this:
> ListeItem 1:
> 10099,
> PS2/162,
> 253,
> U,
,
>
> BAY19,
> SCAR,
,
>
> 01/01/1980,
> 0,
,
>
,
>
,
>
,
>
,
>
> 43525,
,
>
,
>
,
>
,
>
> NCA150347,
,
>
> 0,
> N,
> 05/01/1993,
> 24,
> Y
>
> Listitem 2 and so on.
>
> I would reall appreciate your help
>
> Many thanks,
> cfcoder
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
  
> _____  
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to