waiting for file to finish copying

Hello all,
I’m hoping that someone out there can help me with this problem. I have a script that’s copying files (one at a time through a repeat loop) from mounted server volumes. Every once in a while I catch a server that has significantly slowed down and the script crashes while waiting for the file to finish copying. Is there any way to get the script to wait for the file to finish copying or to delay the time out?
Thanks in advance, BC

There are several ways to check if a file is busy (its type changes to *bzy, I think) and there are OSAX that will do this. Someone else will have to post which ones, or you’ll need to search the OSAX database.
A search of past answers to this question at the bbs might be productive as well.

I think the default timeout is 60 seconds (or is it 90, or something else? I don’t remember). Anyway, to change the timeout, do the following:

with timeout 600 seconds -- 10 minutes
  duplicate someFile to someFolder
end timeout

That gives it ten minutes for EACH file. Change the number to beat your worst-case scenario.