Computing.Net > Forums > Windows XP > Edit text file using a batch file.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Edit text file using a batch file.

Reply to Message Icon

Name: vlad123
Date: July 16, 2009 at 01:38:54 Pacific
OS: Windows XP
Subcategory: General
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: vlad123
Date: July 16, 2009 at 03:12:31 Pacific
Reply:

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. :)


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Edit text file using a batch file.

parsing through a text file using a batch www.computing.net/answers/windows-xp/parsing-through-a-text-file-using-a-batch-/180355.html

Batch file to edit text file www.computing.net/answers/windows-xp/batch-file-to-edit-text-file/156973.html

Batch File Parsing a text file www.computing.net/answers/windows-xp/batch-file-parsing-a-text-file-/151425.html