• 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: duplicate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplicate


  • Subject: Re: duplicate
  • From: Yvan KOENIG <email@hidden>
  • Date: Mon, 9 Oct 2006 21:20:22 +0200


Le 9 oct. 2006 à 21:10, Adam Bell a écrit :

Is this known to be broken?

set n to "someName.txt"
duplicate (choose file) to (choose folder) with properties {name:n}

That snippet won't compile in a Finder block which complains about the "{"  but since duplicate is a Standard Editions verb it doesn't need the Finder. As is it hangs in some kind of internal problem without duplicating the file to the chosen folder.

Adam Bell

Is it new ?

Looking at the dictionaries I got:

tell application "System Events"
set n to "someName.txt"
duplicate (choose file) to (choose folder) with properties {name:n}
end tell
(*
duplicate v : Copy object(s) and put the copies at a new location.
duplicate reference : the object for the command
to location reference : The location for the new object(s).
[with properties record] : Properties to be set in the new duplicated object(s).
*)
tell application "Finder"
set n to "someName.txt"
-- duplicate (choose file) to (choose folder) with properties {name:n}
end tell

(*
duplicate v : Duplicate one or more object(s)
duplicate reference : the object(s) to duplicate
[to location reference] : the new location for the object(s)
[replacing boolean] : Specifies whether or not to replace items in the destination that have the same name as items being duplicated
[routing suppressed boolean] : Specifies whether or not to autoroute items (default is false). Only applies when copying to the system folder.
Å® reference : to the duplicated object(s)
*)

There is NO parameter 'with' in the Finder's one.

Yvan KOENIG
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: duplicate
      • From: Adam Bell <email@hidden>
References: 
 >duplicate (From: Adam Bell <email@hidden>)

  • Prev by Date: duplicate
  • Next by Date: Re: How do I loop through already open psds?
  • Previous by thread: duplicate
  • Next by thread: Re: duplicate
  • Index(es):
    • Date
    • Thread