Thanks Anthony, but doing this gives the error message ‘undefined error: the parameter filename cannot be empty’.

Is there another way to handle this?

Best wishes

Andrew.