"Smart" front end for Beyond Compare

I did a small change to my v2.2 LD fork, which is what I'm still using these days (mainly because I've had no reason to change it). Don't know if it'll be of interest to anyone else, but maybe the change is worth merging into the main version. (Up to you, AussieBoykie!)

  • Added NEWWINDOW argument (passes /solo switch to make BComp.exe open a new window).
  • Updated default/fallback path to the Beyond Compare 4 one.

I'm running it from a button like this, so I can hold Shift to get a new window instead of a new tab:

@keydown:none
BeyondCompare
@keydown:shift
BeyondCompare NEWWINDOW

Here's the diff of the change. Very simple, as you can see:

1 Like

Very simple stuff. I just want to compare 2 files by context menu rapidly. The 2 files could be on the same view or on the opposite view. I just wrote this which is a lot easier than a script. Not sure why a script is needed.

BCompare.exe {allfilepathdest} {allfilepath}

This actually also can compare 3 files. I'm using this. Much easier.

A simple button is what we used to use. The scripts just do things a little better. e.g. Things like:

  • Automatically select a file (or folder) with matching name on the other side if you only select a single file.
  • If nothing at all is selected, it compares the left and right folders instead of any selection.
  • Ensures the left and right sides are consistent in BC and Opus (even when the right side is the source in Opus)
  • Avoids mistakes like trying to compare a folder with a file.
  • Finds BCompare.exe for you, since it may not be in the path.
2 Likes

This was not said in the first post. The ability to Automatically select a file (or folder) with matching name on the other side is the most attractive to me.

The problem with
BCompare.exe {allfilepathdest} {allfilepath}
is that you can't easily control what should be on the left-middle-right.

I get different results depending on what file you right click on or if a file in dest is selected.
Can you define the order of files passed by {allfilepath} and {allfilepathdest}. Strange behavior that I can explain more. Should I create a new topic for this command? or Continue here?
BCompare.exe {allfilepathdest} {allfilepath}

Yes, start a new topic please. This has no connection to the script anymore. Have a look at Help passing left and right selected folders in simple button and the threads linked in there as well.

1 Like

So I select only one file and click the button, this script does not find the matching file on the destination! How is this supposed to work?

It just opens the left and right path in BC.

The "select only one file" thing may only be in my fork; I haven't checked if it got merged into the main script or not.

1 Like

Just installed your fork. Yes it works in your fork.

This script does not do 3 files compare. Needs to be smarter! :wink:

Source code is included. Feel free to improve it to do what you want. That's what I did.

2 Likes

This does three file compare.

1 Like

I've had this installed for a year or two. All of a sudden I'm getting this message when trying to use it: Windows can't find $BC

I downloaded the latest version and copied it into the script directory. It was the same I already had but I thought mine might be corrupted. But it still fails. And if I go into settings, the file does not show in the right box as shown in the above installation image. I have standard buttons setup to run Beyond Compare and they work. So the problem seems to be with the setup of this script. Any ideas on how to fix this?

Using
Directory Opus Pro 12.24 Build 7795 x64
OS 6.1 (B:7601 P:2 T:1) SP 1.0 "Service Pack 1"

Your antivirus might be blocking the script from loading. No other reason I can think of for it to stop working when it hasn't changed.

Thank you. That was it.

Hello. Is there a possibility to print compared txt files? This is a headache for this program

Depends what kind of output you're looking for, I suspect.

A command line diff tool could do it easily but one of the other tools might have something more suited to printing. What's best may depend on what you're looking for.

i just want to print this image... and can't!

Can't you just press Ctrl-P for the normal Windows print dialog?

Made another change to my forked version:

  • Fixed problem with files that have archive extensions handled by plugins, but aren't valid archives.