Integrating external (third party) file and folder compare tools. Select the files you want to compare and click the menu button for the compare tool of your choice.
Compare logic supported
- Two, three and n way file/folder comparison on selected items in the source Lister
- Two way file/folder comparison for single selected item in each Lister
- Two way file/folder comparison for single selected item in first lister, to file with same name in second Lister
- Two way folder comparison of source and destination when no items are selected
The script needs to know where the compare tool exe is stored. First run for specific tool the script will ask you to find the exe. This will be stored in a global variable for next use. Hold down shift when clicking the button to force re-request for exe path.
|Application||Two way file||Three way file||Folder compare||Tested|
|Araxis||compare & merge||compare||yes||yes|
|BeyondCompare||compare & merge||yes|
|BeyondCompare3||compare & merge||compare||yes||yes|
|BeyondCompare4||compare & merge||compare||yes||yes|
|Devart Code compare||compare & merge||compare||yes||yes|
|EllieComputing||compare & merge|
|Guiffy||compare & merge|
|KDiff3||compare & merge||compare||yes||yes|
|UltraCompare||compare & merge||compare||yes||yes|
|TortoiseMerge||compare & merge||compare & merge|
|VisualSlickEdit||compare & merge|
|VisualSourceSafe||compare & merge|
|VisualStudio||compare & merge||yes|
|WinMerge||compare & merge||yes||yes|
Sample menu with all pre configured tools. You would prob only keep a couple of the buttons.
How to use
Assuming that you want to use one of the already configured tools (see image above).
- Download the latest version of ExternalCompare.osp, and copy it to the dopus script folder /dopusdata\Script AddIns
- Download the ExternalCompare.dcf and add it to your tool bar.
- Select the files to compare and click the button relating the to tool you would like to use.
- You will be asked to locate the compare tools executable.
Configuring a new tool
Configuration of a new tool details
The building of the command line and selecting identifying the files and folder to pass in to the tool is based on Leo’s version of the “smart beyond compare script”. To enable the use of different compare tools I have stored command line configuration for the different tools in to the script. I used the same command line pattern as seen here link. By using this pattern I have been able to borrow the configuration as described in that link. Have tested a couple of the tools, but I have not tested most of them, I’m sure a few tweaks will need to be made.
Command Argument codes
- %1 = Original file (in diff, the pre-changes file, in merge, the “server” or “theirs” file, the file that is the base file after “their” changes were applied)
- %2 = Modified file (in diff, the post-changes file, in merge the “yours” file - the base file with “your” changes applied)
- %3 = Base file (in the 3-way merge operation, the file which both “theirs” and “yours” are derived from - the common ancestor. This doesn’t mean it’s the version the changes were based from, since this may be a cherry-pick merge)
- %4 = Merged file (The output file for the merge operation - the filename that the merge tool should write to)
- %5 = Not used - Could be additional command-line options.
- %6 = Original file label (The label for the %1 file)
- %7 = Modified file label (The label for the %2 file)
- %8 = Base file label (The label for the %3 file)
- %9 = Merged file label (The label for the %4 file)
- %nfile = for n number of files. Pattern = "%1 %2 …"
Please share any new tools you setup or feedback.
Thanks and credit
In this post “Smart” front end for Beyond Compare AB and Leo wrote some scripts for comparing files and folder in Beyond compare. I have built on this piece of work to use the same file/folder selection logic but to allow other comparison tools to be used.
Thanks to AB and Leo for their work on the beyond compare script, and to James Manning for maintain the list of command line arguments.
ExternalCompare.osp (103.2 KB)