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]
- RE: how to get rid of the new line character cf coder
- RE: how to get rid of the new line character Semrau Steven Ctr SAF/IE
- RE: how to get rid of the new line character Pascal Peters
- RE: how to get rid of the new line character Pascal Peters