Many thanks to everyone who has responded. Will give the solutions a go first thing in the morning and see what fits. I think I need so spend a bit more time with PERL (or python). In fact, I think I just need a bit more time. Chris