Your way helped me out a lot. But the only problem is that it is UTF-8. How do I make it to be ANSI? If it is UTF-8, and I have @Echo Off at the top, it still shows the current directories and commands. That is why I need it to be ANSI, just if anyone wanted to know. So does anyone know how to do that?
Use the override of the OpenTextFileWriter method that enables you to specify the encoding, and nominate the encoding you want to use.
http://msdn.microsoft.com/en-us/library/ms128024(v=VS.80).aspx
However, I suspect your problem might be in the line terminator instead of the encoding. You can use a write method that does not write the line terminator, and add the exact character sequence you need (eg, with the CHR() function), or use the TextWriter NewLine property to define your own NewLine.