Creating custom command

Well, the DOpus 10 documentation is still not done and I need some help creating a command. Can one of you help me? I don't know where to start. I want to make a button that will use a CLI-based SCP program to copy selected files in the source area to the destination. The destination will be something like ftp://myserver/my/path. I was thinking a command like the following would work:

C:\apps\pscp.exe {allfilepath$} {destpath$}

But first {destpath$} will need to be transformed to something that the CLI command understands like "myserver:/my/path". Also the button needs to look into DOpus and see what user name is used to connect to the SFTP site so it can pass that to the SCP executable in the CLI. I can use @script to handle this programming logic, right? How do I do this?

I don't think there is a way to get Opus to insert the username for the connected SFTP site into the command-line. You may need to use a script that knows which username to use for each site (or that can work it out based on the path, e.g. if you're always working within a home folder that has the username in it>)

You'll need to use some kind of script to do translate the SFTP path from the format Opus provides into the one that pscp.exe expects, too.

Don't use @script; instead, write a standard .vbs script file and make Opus call that. If you get that working and then want to move the script into the Opus command, so everything's in one place, there are ways to do that. But get it working first before worrying about that as it makes things much more complex if you do it that way from the start.