Wednesday, December 18, 2013

Removing Hard Returns with a DOS Batch File

This is just a quick post to save a much-queried DOS Batch file. This will delete hard returns from a given input file. Note that it does an append (">>") to the output file, so you will need to delete the output file each time you run this command.

for /f "delims=" %a in (inputfile.txt) do (echo /s|set /p="%a") >> outputfile.txt

Works like a champ!

No comments:

Post a Comment