maciep you're a star!!
That works an absolute treat!
Now all I have to do is get my head round how your script actually works.
I've never used Ascan before.

Thanks for all your help guys.

Glenn.