Putting more than one line per file into the clipboard is probably too much for the Clipboard command. A little script can help:
// https://resource.dopus.com/t/text-replace-for-folder-path-copied/40055
function OnClick(clickData) {
var cmd = clickData.func.command;
var tab = clickData.func.sourcetab;
cmd.deselect = false;
if (tab.selected_dirs.count == 0) return;
var tmp = '';
for (var e = new Enumerator(tab.selected_dirs); !e.atEnd(); e.moveNext()) {
var item = e.item();
var stdPath = String(item.realpath).replace(/^C:\\User\\huangb/, '%userprofile%');
tmp += 'EN:\r\n';
tmp += stdPath + '\r\n';
tmp += 'DE:\r\n';
tmp += stdPath.replace(/Documents/, 'Documente') + '\r\n';
tmp += '\r\n';
}
DOpus.SetClip(tmp);
// cmd.RunCommand('Set UTILITY=otherlog');
// DOpus.ClearOutput();
// DOpus.Output(tmp);
}
Button as XML
<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
<label>Text Replace For Folder Path Copied</label>
<icon1>#clipcopy</icon1>
<function type="script">
<instruction>@script JScript</instruction>
<instruction>// https://resource.dopus.com/t/text-replace-for-folder-path-copied/40055</instruction>
<instruction />
<instruction>function OnClick(clickData) {</instruction>
<instruction> var cmd = clickData.func.command;</instruction>
<instruction> var tab = clickData.func.sourcetab;</instruction>
<instruction> cmd.deselect = false;</instruction>
<instruction />
<instruction> if (tab.selected_dirs.count == 0) return;</instruction>
<instruction />
<instruction> var tmp = '';</instruction>
<instruction> for (var e = new Enumerator(tab.selected_dirs); !e.atEnd(); e.moveNext()) {</instruction>
<instruction> var item = e.item();</instruction>
<instruction> var stdPath = String(item.realpath).replace(/^C:\\User\\huangb/, '%userprofile%');</instruction>
<instruction> tmp += 'EN:\r\n';</instruction>
<instruction> tmp += stdPath + '\r\n';</instruction>
<instruction> tmp += 'DE:\r\n';</instruction>
<instruction> tmp += stdPath.replace(/Documents/, 'Documente') + '\r\n';</instruction>
<instruction> tmp += '\r\n';</instruction>
<instruction> }</instruction>
<instruction />
<instruction> DOpus.SetClip(tmp);</instruction>
<instruction />
<instruction> // cmd.RunCommand('Set UTILITY=otherlog');</instruction>
<instruction> // DOpus.ClearOutput();</instruction>
<instruction> // DOpus.Output(tmp);</instruction>
<instruction>}</instruction>
</function>
</button>