Would a simple script be ok?
function OnClick(clickData) {
var cmd = clickData.func.command;
var tab = clickData.func.sourcetab;
var dtab = clickData.func.desttab;
cmd.deselect = false;
cmd.SetSourceTab(dtab);
cmd.RunCommand('Select NONE');
for (var e = new Enumerator(tab.files); !e.atEnd(); e.moveNext()) {
var item = e.item();
cmd.RunCommand('Select PATTERN="' + item.name_stem + '*.*"');
}
cmd.RunCommand('Select INVERT');
cmd.RunCommand('Select SHOWFOCUS');
cmd.RunCommand('Set SOURCE=toggle');
}
Button as XML
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none">
<label>Select Files in Dest</label>
<icon1>#advancedselect</icon1>
<function type="script">
<instruction>@script JScript</instruction>
<instruction>function OnClick(clickData) {</instruction>
<instruction> var cmd = clickData.func.command;</instruction>
<instruction> var tab = clickData.func.sourcetab;</instruction>
<instruction> var dtab = clickData.func.desttab;</instruction>
<instruction />
<instruction> cmd.deselect = false;</instruction>
<instruction> cmd.SetSourceTab(dtab);</instruction>
<instruction> </instruction>
<instruction> cmd.RunCommand('Select NONE');</instruction>
<instruction> </instruction>
<instruction> for (var e = new Enumerator(tab.files); !e.atEnd(); e.moveNext()) {</instruction>
<instruction> var item = e.item();</instruction>
<instruction> cmd.RunCommand('Select PATTERN="' + item.name_stem + '*.*"');</instruction>
<instruction> }</instruction>
<instruction> </instruction>
<instruction> cmd.RunCommand('Select INVERT');</instruction>
<instruction> cmd.RunCommand('Select SHOWFOCUS');</instruction>
<instruction> cmd.RunCommand('Set SOURCE=toggle');</instruction>
<instruction>}</instruction>
</function>
</button>
</button>