• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Moving Items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Moving Items


  • Subject: Moving Items
  • From: Luther Fuller <email@hidden>
  • Date: Sun, 10 Jul 2011 17:04:53 -0500

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?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Moving Items
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: key pressed event
  • Next by Date: Re: Moving Items
  • Previous by thread: Re: key pressed event
  • Next by thread: Re: Moving Items
  • Index(es):
    • Date
    • Thread