Can you save the script as a script rather than as a text file (remove any
passwords first).
It's too hard to recreate otherwise.

Jane