• 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
Re: try...on error...no error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: try...on error...no error?


  • Subject: Re: try...on error...no error?
  • From: Michael Terry <email@hidden>
  • Date: Thu, 11 Dec 2003 10:33:38 -0800

On Dec 11, 2003, at 9:30 AM, John Goodchild wrote:

tell application "Finder"
try
copy file "fileName" of folder "folderName" of disk "diskName" to folder "otherFolderName" of disk "otherDiskName"
on error eMess number eNum

--process the result if error generated...

end try
end tell

Any ideas would be most welcome.


How about:

tell app "Finder" to try
set srcFile to file "blah" of folder "blah" of disk "blah"
set destFold to folder "blah" of disk "blah"
open for access (srcFile as unicode text) write permission true
close access result
copy theFile to destFold
on error
-- etc
end try


Cheers,
Mike
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: try...on error...no error?
      • From: Steve Roy <email@hidden>
  • Prev by Date: Re: Reading a file as it fills up by another program
  • Next by Date: Quark conflicting properties
  • Previous by thread: Re: Reading a file as it fills up by another program
  • Next by thread: Re: try...on error...no error?
  • Index(es):
    • Date
    • Thread