Thanks Marcel
That now works - objects that have copied across are imported without delay, objects that fail the first time are imported after the 5 seconds according to the sleep set in the code.
I'm having less consistent results with very large objects. I have tried copying in a half-gig BTO, which takes about 45 seconds to transfer. At 5 seconds sleep, I had a long list of -FAILED: Error on Load, but then when it had copied instead of then loading it, the error messages moved onto the next object. I copied two large BTO and three standard mammos in that test, and only the three standard mammos were imported.
I then tried an 8 second delay and just importing the one file, same result, ie a list of -FAILED as it copied, then nothing; object was deleted, nothing was imported.
I thought maybe that whilst it appeared to be looping, maybe it would only import at the first or second attempt. So I set the sleep to 90 seconds, and got the initial -FAILED followed 90 seconds later by a successful import.
To test my hypothesis further, I then set a 40 second delay and tried again with a similar BTO. This time, I have three -FAILED messages followed by a successful import!
So I don't understand what is happening.