Hmmm... I worked out a way that seems to work in a variety of scenarios. It needs an external script - as I couldn't figure out how to do it as an MS-DOS Batch Function entirely within Opus without getting some strange results.
First, a button definition you can add to any toolbar:
<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
<label>Copy Path to Clipboard</label>
<icon1>#clipcopy</icon1>
<function type="normal">
<instruction>@runmode hide</instruction>
<instruction>dopusrt /cmd clipboard copynames=single</instruction>
<instruction>/scripts\clipset.cmd {alias|home} {s|noterm} {allfilepath}</instruction>
</function>
</button>
It calls "dopusrt" to run the regular Opus 'clipboard copynames=single' internal command to get any selected files and folders into the clipboard on a single line - as requested. If nothing is selected, then this command doesn't do anything to the clipboard - whatever was there stays there. I had to use "dopusrt" because otherwise - if NO files or folders are selected, then the button stays grayed out and can't be clicked.
Regardless of whether or not the first command does anything (again, depending on whether or not you have anything selected) the button then ALWAYS calls the batch file from the /scripts folder alias. That's an alias I've created on my system that points to /dopusdata\Scripts. You can put the batch file wherever you want, just then modify the path in the button... The batch file (named clipset.cmd) should contain the following code:
[code]@echo off
setlocal
if (%3)==() goto set
goto end
:set
set _exe=%1
call :dequote _exe
::echo %_exe%
set _dir=%2
call :dequote _dir
::echo %_dir%
"%_exe%dopusrt.exe" /cmd clipboard set %_dir%
goto end
:dequote
for /f "delims=" %%a in ('echo %%%1%%') do set %1=%%~a
goto :eof
:end
::pause[/code]
The button is calling the batch script with 3 arguments:
[ol][li]The path to the Opus /home folder alias... this is to allow the script to find the dopusrt.exe program it needs to call in order to set the current path to the clipboard. In case you install Opus to a custom folder, this will then always work without having to hard code the path to dopusrt.exe.[/li]
[li]The current path... without the trailing backslash (which you can change in the button if you want).[/li]
[li]Any/all selected file/folder names...[/li][/ol]
...if the script sees that there is SOMETHING passed in the third argument, which happens if you run the button with any items selected, then the script just exits - assuming that you got what you wanted into the clipboard from the 'dopusrt /cmd clipboard copynames' command in the button before the script ever got called. If the script sees that there is NOTHING passed in the third argument, then it does some subroutine stuff to strip off the double-quotes chars passed in the first two args, then uses those fixed up paths to run dopusrt.exe to set the clipboard to the current path.
I got a bunch of strange results when I tried something like this before my first reply... but after seeing Leo's message - tried again and came up with something that I think will work.
...now go link your account like Leo requested .