PDA

View Full Version : write to text file formatting problem



gnetcanada
03-16-2004, 03:59 PM
Hi Guys,

Im having a problem, when i write my string to a text file, i have it write a new line, but the first character it puts is "\" i think it has something to do with my line formatting code, can anyone help?

--Write the new line to a delimeted text file
TextFile.WriteFromString("salesleads.txt", result13, true);
TextFile.WriteFromString("salesleads.txt", '\r\n\\', true);

This is what it outputs

\s;ssssssssssssssssssssss;sssssssssss;ssssssss;sss ssssssssssssssss;ssssssssssss;sssssss;ssssss;sssss sssssssss;sssssssssssss;Yes;7-12 months;New Cabinets
\


notice the "\" it adds to teh next line after it writes, how does one get rid of that?

Shawn

Stefan_M
03-16-2004, 04:10 PM
if you do not need the backslash at the end of the line change:
TextFile.WriteFromString("salesleads.txt", '\r\n\\', true);
to:
TextFile.WriteFromString("salesleads.txt", '\r\n', true);


Stefan

gnetcanada
03-16-2004, 05:47 PM
thanks.