I can use this to move items from one disk to another ...
tell application "Finder" duplicate itemList to targetDisk end tell
Unfortunately, the Finder shows a progress dialog that allows the user to cancel the Copy. This cannot be allowed. So, I tried using ...
repeat with anItem in itemList tell application "System Events" duplicate (anItem as text) to targetDisk end tell end repeat
But, System Events errors, claiming that (anItem as text) is not type reference. I've used every type I can think (alias, alias as text, posix path, ...) in place of this, but nothing works.
I may try using 'do shell script "cp ..." ', but not yet.
I usually use 'alias as text' with System Events without any problems.
Anyone know what's wrong with 'duplicate' in System Events?
|