Not the neatest of scripts, but would do the job... with a bit more work could be made quite flexible too.
Brett -- thank you so much for such a thorough and quick reply! I'll have a look through this in detail and see if I can make it do what I'm wanting.
Thanks, Richard