Solved How do I remove all line feed characters in a text file?

May 15, 2015 at 10:00:15
Specs: Windows 7
I receive a text file that includes some line feed characters (HEX 0A) sprinkled throughout the file that need to be removed.

This needs to be done in a DOS batch file, but I've not been able to make this work. Can anyone point me in the right direction?


See More: How do I remove all line feed characters in a text file?

Report •


#1
May 15, 2015 at 19:39:20
✔ Best Answer
The solution depends on whether the target LFs are independant from CRs, or coupled with them. Batch cannot differentiate between CRLF and lone LFs. If your file has a mix of lone LFs and CRLF pairs, you would not be able to filter the lone LFs out with batch, although you CAN get rid of ALL linebreaks (LF and CRLF) with batch.

Report •
Related Solutions


Ask Question