• 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
Help needed with Finder copy/duplicate with Apple script !!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help needed with Finder copy/duplicate with Apple script !!


  • Subject: Help needed with Finder copy/duplicate with Apple script !!
  • From: Naresh Kongara <email@hidden>
  • Date: Thu, 12 May 2011 10:19:11 -0700

HI,

I want to copy an item say on desktop to temporary folder.

set sourceFile to "/Users/nareshkongara/Desktop/Saharsh.jpg"
set targetDirectory to "/var/folders/+S/+SfqdTOqEDapIOVh4OYDIE+++TI/-Tmp-/"

tell application "Finder"
duplicate sourceFile to targetDirectory
end tell

When I try to execute the above command I'm getting the fallowing error.


error "Finder got an error: Can’t make \"/Users/nareshkongara/Desktop/Saharsh.jpg\" into type item." number -1700 from "/Users/nareshkongara/Desktop/Saharsh.jpg" to item.

Is there any thing wrong in the script.

Do let me know if you have any idea.


Thanks,
nkongara


 _______________________________________________
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: Help needed with Finder copy/duplicate with Apple script !!
      • From: Luther Fuller <email@hidden>
    • Re: Help needed with Finder copy/duplicate with Apple script !!
      • From: Ron Hunsinger <email@hidden>
    • Re: Help needed with Finder copy/duplicate with Apple script !!
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: Re: Mounting a laptop volume
  • Next by Date: Re: Help needed with Finder copy/duplicate with Apple script !!
  • Previous by thread: Re: Mounting a laptop volume
  • Next by thread: Re: Help needed with Finder copy/duplicate with Apple script !!
  • Index(es):
    • Date
    • Thread