tags:

views:

31

answers:

1

I am building a Applescript droplet to automate some stuff. I have the following line:

tell application "Finder" to duplicate dropped

Dropped being a reference to the file that was dropped on the droplet. The documentation says that this returns a reference to the duplicated object.

I want to

set myVariable to

the reference that is returned but I can't find in any of the documentation how to actually do that!

A: 

The duplicate command allows for a location to be specified:

set theResult to duplicate reference ¬
     to insertion location ¬
     replacing boolean ¬
     routing suppressed boolean

Parameter, Required, Type, Description

direct parameter, required, reference, the object(s) to duplicate

replacing, optional, boolean, Specifies whether or not to replace items in the destination that have the same name as items being duplicated

routing suppressed, optional, boolean, Specifies whether or not to autoroute items (default is false). Only applies when copying to the system folder.

to, optional, insertion location, the new location for the object(s)

Philip Regan