Thanks dpuch. I hadn't heard of NotePad++ before. It sounds like a very handy program. I had previously tried a program called GAWK which is good to do this type of task but runs under DOS which I could never remember the commands.
I'll down load NotePad++ and study how to use it.
Even though I have solved my problem, it's always interesting to know how other would do it.
Thanks for your help.