FWIW: I have a variety of buttons I use with my chosen diff tool... Araxis Merge:
For folder comparisons when I have a dual display lister opened to two different paths I want to compare:
- Code: Select all
<?xml version="1.0"?>
<button backcol="none" display="both" icon_size="large" label_pos="right" textcol="none">
<label>Merge Folders</label>
<tip>Send current Folders to Araxis Merge</tip>
<icon1>#araxis3</icon1>
<function type="normal">
<instruction>@runmode max</instruction>
<instruction>/jtools\araxis\merge.exe {l} {r}</instruction>
</function>
</button>
For file comparisons when I have a dual display lister opened to two different paths, each with files selected I want to compare:
- Code: Select all
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" separate="yes" textcol="none">
<label>Merge Files</label>
<tip>Send seleted Files to Araxis Merge</tip>
<icon1>#araxis3</icon1>
<function type="normal">
<instruction>Set SOURCE=Left </instruction>
<instruction>dopusrt /cmd mergefile</instruction>
</function>
</button>
One of the things I really liked about an update made awhile back to Opus was the addition of {leftpath} and {rightpath} arg codes used in the first button in their short form of {l} and {r}...
The weird thing I'm doing in the second button is done that way to make sure that regardless of which side lister is currently active, the file in the left side file display (top file display when in horizontal mode) is always oriented the same way in my diff tool... which is then called from a user command (mergefile) that runs:
@runmode max
@nodeselect
/jtools\araxis\merge {f} {fd}
...the {l} and {r} handles that for "paths" in folder compares, so it would be kind of nice to have something like {filepathleft$} / {fl} and {filepathright$} / {fr} to do similar for file selections...

.
I like Jon's example of using {filepath$} and {destpath$}{file$} so that you don't have to actually SELECT the second file in the 'other' file display... but it only works when you're comparing files with the same name between source and destination - and very often I'm comparing differently named files in MY work...