See Also: External Compare and Merge Tools 2.0
See Also: WinDiff buttons
See Also: Beyond Compare buttons
See Also: "Smart" front end for Beyond Compare
This toolbar collects together various commands related to diffing and merging files and folders.
I use this toolbar fairly often so I created a menu item that toggles it and also has a Ctrl-D hotkey for quick access. (To recreate the toggle button, copy the contents of the Code box into your clipboard, enter Customize mode in Opus, right-click an empty part of your toolbar and select Paste.)
<?xml version="1.0"?>
<button display="both" hotkey="ctrl+D">
<label>Diffing</label>
<icon1>#dupepane</icon1>
<function type="normal">
<instruction>Toolbar NAME=Nudel-Side-DiffTools STATE=right TOGGLE LOCAL</instruction>
</function>
</button>
The WinMerge icons come from WinMerge.exe itself, assuming you've installed it to the default location.
On to the toolbar itself:
The top button closes the toolbar.
I gave the buttons abbreviated names to keep the toolbar thin and because I find the short labels are easier to parse.
The "WM" buttons run WinMerge (very good, free diff/merge tool).
WM F: Diff the first selected file in the source folder with the first selected file in the destination folder.
(Aside: Adding the Select SOURCETODEST command to a button or hotkey can speed up selecting the same file in both sides.)
WM F SvS: Diff the first two selected files in the source folder.
WM D: Diff everything in the source folder against the destination folder.
The "WD" buttons do the same thing except they run WinDiff (somewhat archaic but still occasionally useful diff tool which comes with Visual Studio) instead of WinMerge.
The Bin F button checks for binary differences between the first selected file in the source folder and the first selected file in the destination folder. It uses the fc /b command that comes with Windows.
The Grep Dir button prompts you for a string and then searches for it within all files in and below the source folder. For each occurance a message is printed showing the filename, line number and actual line of text. It uses the findstr command that comes with Windows XP and above.
The MD5 buttons run a tool (attached) which generates MD5 checksums of everything in the current folder. (Note: Opus can show MD5 checksums without this tool, e.g. by running GetSizes NODESELECT MD5, but this tool can be useful if you want to save the results into a file and then diff it against the same output for a different folder.)
MD5 Files will print out MD5 checksums for all files.
MD5 to Log asks you for a log file name and writes the checksums into that file.
MD5 Dir will print a single checksum for the entire folder. (This is calculated by generating the usual MD5 output and then calculating the MD5 checksum of that. This calculation isn't standard but can provide a quick way to verify that two folders are identical.)
The XLS->VBA button runs some VBScript (attached) which automates Excel to extract all VBA code into textfiles in a sub-directory created with the same name as the selected XLS file. This provides a decent way to quickly diff XLS files for VBA changes.
Beware that the VBA output files often have extra directives in them which you should remove if you paste them back into Excel's Diabolical VBA Editor. I recommend you only use the files for diffing and not for editing or archival.
To run use the XLS->VBA script you must turn on Trust access to Visual Basic Project in Excel. In Office 2003 this option is under Tools -> Macro -> Security -> Trusted Publishers but, since Microsoft love to randomly re-arrange everything with each release of their major applications, it's probably somewhere completely different in every other version.
Two versions of the toolbar are attached, one made for Opus 8 and the other tweaked slightly for Opus 9.
Nudel-DiffTools.zip (1.4 KB)
Nudel-DiffTools-Opus9.zip (1000 Bytes)
ExportVBAfromXLS.zip (717 Bytes)
csmd5.zip (30.3 KB)