Splitting to multiple files at runtime
Posted: Wed Aug 27, 2008 12:46 am
I have got a source text file as follows
Now I want to create output files as per the TargetFileName column. Ie. One file named ABC.txt and one file named DAMMY.txt and so on each on which will have only the columns DataCol1 and DataCol2.
Code: Select all
-------------------------------------------
TargetFileName DataCol1 DataCol2
--------------------------------------------
ABC.txt 1 2
ABC.txt 5 6
ABC.txt 11 12
ABC.txt 41 24
DAMMY.txt 12 23
DAMMY.txt 34 45
DAMMY.txt 24 99
... and so on...
The number of TargetFileName is variable
Note - The number of TargetFileName is variable... thats what has made me come to this forum...