Edit text file using a batch file.

July 16, 2009 at 01:38:54
Specs: Windows XP
Hi,
I have NewTest1.txt with the following data:
Name, Score
Ben, 347
Sonny, 3656
Sai, 23

I would like a batch file that gets the names only and save it in NewTest2.txt like this:
Name
Ben
Sonny
Sai

Thanks for the help.


See More: Edit text file using a batch file.

Report •


#1
July 16, 2009 at 03:12:31
I think i got it... :)

for /f "Delims=," %%a in (NewTest1.txt) do (
echo %%a >> NewTest2.txt
)

Thanks to all related posts in this site. :)


Report •
Related Solutions


Ask Question