Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: duplicate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplicate




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

References: 
 >duplicate (From: Adam Bell <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.