Greetings All,

OK, as a newbie I finally did it! One of my program's functions is to create a few text based files. Then, ... ok let me show you how it is:

File 1:
=======
[Profile]
Run1=....
Run2=....
[Batch]
Run1=...
Run2=...


File 2:
=======
[Profile]
Run1=....
Run2=....
[Batch]
Run1=...
Run2=...


File 3:
=======
[Profile]
Run1=....
Run2=....
[Batch]
Run1=...
Run2=...


Everything is just fine here but the last step is to create one file that contains all the above. That means:

Final File:
===========
[Profile]
Run1=....
Run2=....
[Batch]
Run1=...
Run2=...
Run3=...
Run4=...
Run5=...
Run6=...


But my final result looks like this:

My Current File:
================
[Profile]
Run1=....
Run2=....
[Batch]
Run1=...
Run2=...
[Profile]
Run1=....
Run2=....
[Batch]
Run1=...
Run2=...
[Profile]
Run1=....
Run2=....
[Batch]
Run1=...
Run2=...

I could have written the code to correct this problem earlier but as I said I am still a newbie! The [Profile] section is OK but I have no idea of any way of sorting out the [Batch] section. So, I really need help on this one.

Any suggestion / recommendation would be greatly appreicated.