on open the_items
set destination to posix path of last item of the_items
set files_to_move to items 1 thru -2 of the_items
repeat with this_file in files_to_move
do shell script "mv " & quoted form of posix path of this_file & space
& quoted form of destination
end repeat
end open

On Apr 26, 10:24 am, Chris Cairns <[email protected]> wrote:
> I want to create a "Move to" action which shall always do a "Move  
> to" (instead of a "Copy to" in case the destination volume is  
> different than source volume). This will be done by first copying and  
> then deleting the files.
>
> I shall use only two panes because I don't know how applescript will  
> except an item from the third pane.
> This is how I propose to do it:
>
> 1. I shall collect items a,b,c,d etc in pane 1 using comma trick. The  
> last item (say z) shall be the destination folder.
>
> 2. I shall run an applescript in the actions pane to work on these  
> items.
> 3. In the applescript, I want to be able to refer to the last item  
> (say z) so that i can use z as the destination folder.
>
> Is there a way to refer to the last item among all the items in the  
> first pane?
>
> Thanks in advance.

Reply via email to