Paste clipboard to an alias folder

Hi,
I'm trying to create a button to past copied folders and files to an alias named "chemin1".
I used "Clipboard PASTE" but I don't know how to pass the destination folder as an argument...

So I did this for now :

Select all @set cheminlister {sourcepath} Go /chemin1 Clipboard PASTE Go {$cheminlister}

So please, how can I do it in a much better way ?

Thanks for your help :slight_smile:

PS : I already asked in "Help & support" but didn't get an answer... Anyway I was in the wrong place...

function OnClick(clickData) { var cmd = clickData.func.Command; cmd.deselect = false; cmd.ClearFiles(); cmd.SetSource(DOpus.FSUtil.Resolve("/chemin1")); cmd.RunCommand("Clipboard PASTE"); }


Make sure Function is set to Script Function.

If you're using Opus 11 not 12, add a line with @script JScript to the top.

Thank you very much Leo, it worked like a charm.
For now, I am realy unable to make this kind of script !
But when I made the button, I saw a very intersting example script, I will learn with it and the DO's help file.
Please, if you know other places noob friendly to learn scripting, please share :slight_smile:

Thank you both for the idea and solution! o))
I felt this functionality is worth adding to the ClipboardEx addin: [Command: ClipboardEx (clipboard related functions))

@mykael
The ClipboardEx command to achieve what Leos script button does is as follows:
MOVE is optional and multiple folders are possible as well if separated by ";".

ClipboardEx PASTETOFOLDERS FOLDERS="/chemin1"

Cya! o)

@tbone
Everything works perfectly, marvelous !
Thanks :slight_smile: