PDA

View Full Version : Rules and Export/ Import from Compare Command Line


Vikas
14-Dec-2011, 09:15 PM
I am using Beyond compare heavily for a project and to enhance the offering further , I need to anaylze whether I can :

Compare two files using command line. I also need to apply rules through command line itself. I have lot of research however could not find answers to these queries :

1. Can I apply rules from command line. I have tried using bcqc urility but it gives result only as a DOS error level . Can I get a detailed report after applying on the fly rules from command line. If yes please share some sample code.

2. Can I also export and import settings, rules of Beyond compare using command line.

Aaron
15-Dec-2011, 10:03 AM
Hello,

BCQC is a BC2 command line utility. You can use the /quickcompare command line parameter for Beyond Compare 3.
Both do just return DOS ErrorLevels.

To return a more detailed report, you can use BC Scripting in either BC2 or BC3. Further documentation can be found in the BC3 Help file, Using Beyond Compare -> Automating with Script, or in the Scripting Reference section.

Script is a simple text file that is called from the command line, like this:
bcompare.exe "@c:\bcscript.txt"

where bcscript.txt can contain a series of commands, like this:
log verbose "c:\bclog.txt"
load "c:\folder1" "c:\folder2"
expand all
folder-report layout:side-by-side output-to:"c:\bcreport.html" output-options:html-color

BC3 does not support importing or exporting settings on the command line. Which settings are you looking to control? Most can be accomplished using loaded sessions, session defaults, or script commands.

Vikas
19-Dec-2011, 06:09 AM
Thans a lot Aaron.
I have checked the Automation with scripts section of the help manual. I actually want to compare files by applying mutiple rules. One scenario could be:

1. Indicating key columns.
2. Specify unimportant columns
3. Apply decimal precision


Is this possible using command line. I would want to have a detailed (HTML, csv etc) report. Highlighting mismatched.

Also do we have a list of all possible command that can be run through command line. The help manual do have a list of commands. Are they all or do we have more??


When I say importing/exporting setting I mean that I will import and export all my rules (could be multiple ) applied to a session, my tool settings. Is this possible through command line. If yes please share the sample code.

Aaron
04-Jan-2012, 02:08 PM
Hello,

I hope I answered your question here:
http://www.scootersoftware.com/vbulletin/showthread.php?t=8361