Open text file, insert CR on line and save

October 13, 2009 at 19:05:07
Specs: Windows XP
Hi I have a text file that looks like this:

0x19, 0x01, //comments
0x29, 0x02, //comments
0x15, 0x00, //comments

How can I split the lines so it looks like this:

0x19,
0x01, //comments
0x29,
0x02, //comments
0x15,
0x00, //comments

And resave the file.

Thanks
Squib


See More: Open text file, insert CR on line and save

Report •


#1
October 13, 2009 at 19:26:12
Try making a Batch file like this. It will save the output to a new file in the same directory as the batch.


@echo off
For /f "tokens=1,*" %%a in (Text.txt) do (
echo %%a >> New.txt
echo %%b >> New.txt
)


Report •

#2
October 13, 2009 at 23:48:48
Yep thats it. Thankyou very much.

Report •

Related Solutions


Ask Question