DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: wanted: windows command line executable to convert EOL CR<->CRLF  (Read 12,232 times)

tinjaw

  • I'm so glad breakbeat techno isn't an illegal drug
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Military Service Badge - US Army
    • Linux User
My Google Fu is dull today and I can't seem to focus it down to finding what I want.

I'm using a DOS batch file to do some stuff and I want to call a command line tool that will take all my ASCII files and convert the EOLs from windows format to unix format (and vise versa).

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
It's been a while since I needed to use this kind of utility, but here's a pointer to one (that I haven't tested) that comes with source, so if you have any problems, you can fix them:

  - http://www.xs4all.nl/~waterlan/dos2unix.html

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 3,217
CRLF from Horst Schaeffer's freeware collection PBATS - a 16-bit DOS program, but worked well for me on XP.  A quick check shows it appears to work well under Vista Home Premium as well.
CRLF 1.3 (c) Horst Schaeffer
Filter, makes CR+LF for lines terminated by CR or LF only
Options:
/C    lines to be terminated by CR only
/L    ... by LF only
/T    cut trailing blanks
/E[n]  remove empty lines [if more than n]

tinjaw

  • I'm so glad breakbeat techno isn't an illegal drug
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Military Service Badge - US Army
    • Linux User
Thanks. That's what I was looking for.  :Thmbsup:

Original address: https://www.donationcoder.com/forum/index.php?topic=22900.0