Download the .osp below, then open Preferences / Toolbars / Scripts, and drag it to the list of scripts.
Beyond Compare.osp (14.9 KB)
After that, go to Settings > Customize Toolbars > Commands and there will be a new Compare command which you can drag to your toolbar:
The command will do different things depending on what is (or isn't) selected in the file displays, as explained below.
The latest version is attached above. Click the relevant links for full details of earlier versions.
- Original version posted on 21st January, 2014
- Updated on 22nd January to add support for checked files/folders (check box mode)
- Version 2.1 (rewrite) posted as an Opus Script Package on 9th April, 2014
- Version 2.2 (add proper versioning) posted as an Opus Script Package on 10th April, 2014
- Version 2.2 LD posted on 30th April by Leo Davidson. Includes a number of refinements and improvements. See linked post for full details.
- Version 2.3 AB posted on 2nd May.
- Version 2.4 AB posted on 12th June. Minor fix to minimum Opus version check.
- Version 2.4 AB (at the top of this post), and the 2.2 LD fork (here) have both been updated to include icons for high DPI systems. No other changes. 12th October 2017.
- Version 2.4 AB (at the top of this post), and the 2.2 LD fork (here) updated again to fix an issue with large icons and high DPI.
I regularly use Beyond Compare to check for differences between versions of files and to synchronise folders. For a long time I have used a toolbar with a variety of buttons to compare two SOURCE files, compare a SOURCE file and a DEST file, compare a SOURCE folder and a DEST folder, etc..
With the introduction of script support in Opus 11 it seemed like a good time to merge all of these discrete buttons into a single "smart" button which examines the environment (e.g. SOURCE only, SOURCE/DEST or DUAL, how many files/folders checked or selected in SOURCE and DEST) and then executes Beyond Compare with the relevant option. For example, if exactly two files are checked or selected in SOURCE, compare these files, or if one folder is checked or selected in SOURCE and one folder in DEST then compare them.
Original button code as follows. (N.B. This has long since been superseded. See above for the latest package.) The only customisation required is to identify where bcompare.exe is on your system. At the time the original code was developed, Beyond Compare v3 was the current version and Beyond Compare 4 was in public Beta so I made provision for switching easily between versions.