(*alias RESOURCES:FOX RESOURCES: ? BASE ARTS:SLICKS/GENERIC:TCFHE:TCFHE DVD SLICKS:EPS Files:DVD LOGO WHITE.eps*) current application "Finder got an error: The operation could not be completed because the file ?? is in use."
The error message indicates the file is still open on the user's mac. Possibly during unstuffing?
I'd suggest adding a try block and a delay.
Here's a version that traps an error, waits 5 seconds, then tries two more times, then gives up.
on moveItems(Sources, destination) log Sources tell application "Finder" repeat with ThisBit in Sources set errorcount to 0 repeat try log ThisBit duplicate ThisBit to destination with replacing on error errText number errNum set errorcount to errorcount + 1 if errorcount = 3 then log "Error: " & errText & return & errNum & return & ThisBit display dialog "Error: " & errText & return & errNum & return & ThisBit buttons {"OK"} default button 1 giving up after 5 exit repeat end if delay 5 end try
end repeat end repeat end tell end moveItems
You may also consider getting the size of thisBit, delaying a few seconds, getting its size again, and if the size hasn't changed, then duplicate it.
HTH,
ES
=
|