Go Back   Scooter Forums > Beyond Compare 3 Discussion > Text Compare (2-way)
Register FAQ Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 25-Jun-2012, 09:28 AM
Cougar Cougar is offline
Visitor
 
Join Date: Jun 2012
Posts: 7
Default Using the Command Line to Compare XML files

I am tring to use the command line to compare 2 xml files. I want to be create certain rules so that the comparison can look for certain details and also ignore details. I want to do this all through the command line. How can i do this?
Reply With Quote
  #2  
Old 25-Jun-2012, 12:22 PM
Aaron Aaron is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 5,434
Default

Hello,

What is your end goal of the command line call? Is it to create a Text-Report report file (as plain .txt or html)?

You can initiate a comparison from the command line and create a report using BCScripting or generate an %errorlevel% using quick compare. Scripting documentation can be found in the Help file in the Using Beyond Compare -> Automating with Script section.

You cannot set the unimportance rules from the command line. The main option here is to define the defaults ahead of time using the graphical interface, as detailed here:
http://www.scootersoftware.com/suppo..._unimportantv3

Or you can use another scripting language to override the BCSetting.xml files previous to calling BC3 and manually reconfigure the global defaults. This is more of a workaround and the former solution is recommended for most cases.
__________________
Aaron P Scooter Software
Reply With Quote
  #3  
Old 25-Jun-2012, 01:14 PM
Cougar Cougar is offline
Visitor
 
Join Date: Jun 2012
Posts: 7
Default

I am creating an interface in C# using the Beyond Compare software. So i need to use scripts or commands. I mainly want to be able to use regular expressions but i am confused on how to use them with this software. What would be the best way to do this you think? Can you give me an example of how to use the regular expressions in a script or a command ? Thank you for you help by the way
Reply With Quote
  #4  
Old 26-Jun-2012, 03:02 PM
Aaron Aaron is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 5,434
Default

Hello,

The regular expressions would need to be setup ahead of time as a Grammar type for a specific File Format, following the KB article above's instructions. When you call BC3 from the command line, the default behavior uses the global defaults, for either BC Script or the /QuickCompare. Which you would use would depend on if you are comparing folders or generating reports (BC Scripting) or comparing a pair of files and want a command line return code (/QuickCompare).
__________________
Aaron P Scooter Software
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 06:02 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.