General discussion

Locked

Batch file - codes

By kn_abhilash ·
Hi

I have a notepad file( say test1.txt ) which contains data like

---------------------------------------
03/11/04 08:58:41 , , ,KEANO REAVES, RAJIV,3111093

03/11/04 08:58:42 , , ,MORPHINUS TO NEO, MALVIKA, 6721378

03/11/04 08:58:43 , , ,MOFIUS TO NEO, RAJAN, 3409072

03/11/04 08:58:44 , , ,OPTION-C, MANJUNATH TUNGA, 3419607

03/11/04 08:58:45 , , ,C SMITH TO KANUREAVES, SRINATH, 3379771

03/11/04 08:58:46 , , ,MORSEUS TO NEO, BHARATH, 56733724

03/11/04 08:58:52 , , ,OPTION-C, KARTHIK, 5724538
-----------------------------


in this at the end of each line (set of numbers )are phone numbers

what i want is, on execution of a BATCH file, it should copy only the phone numbers to another notepad file ( say test2.txt )

can any one pls tell me the code for the BAtch file for this purpose

Thanks in advance

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by carsten.holfelder In reply to Batch file - codes

You can't do it with a batch, as the text file is a comma delimited file you can import it into a spreadsheet program and the copy the required column to a txt file

Collapse -

by kn_abhilash In reply to Batch file - codes

thanks for the answer

i know how to do it through spread sheet, but i want to do it using an automated process
can i do this in html or something

Collapse -

by joncr In reply to Batch file - codes

You cant do this through dos but I would try perl or awk (both text manupilation scripting languages). Quite easy to learn as well.

Back to Windows Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums