Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2017
    Posts
    11

    Default Way to find out comparison result through script

    Hi Team,

    Is there any method or way , which would help us know the comparison result like match ,mismatch using scripts.

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,677

    Default

    Beyond Compare scripts only output comparison results as reports. See the file-report and folder-report commands in Beyond Compare's help file.

    If you want a comparison result as an exit code, use the /quickcompare or /qc command line switch. It will compare two files and output comparison results as an exit code. Exit codes are listed in the Command Line Reference topic in Beyond Compare's help file.

    Beyond Compare doesn't provide a method to compare two folders and return results as an exit code.
    Chris K Scooter Software

  3. #3
    Join Date
    Jan 2017
    Posts
    11

    Default

    Hi Chris,

    As suggested we are using qc compare command which returns the exit code.

    Just one more query ,just need to confirm the approach we are using is corret or do we need to make any more changes in it.
    Please find below the process we are doing currently.

    We are using below script for comparison and generating the recon file.

    "C:\BCompare.exe" "@C:\My Script.txt" "C:\Left File.csv" "C:\Right File.csv" "C:\Result.csv"

    Config file used is as below:

    data-report layout:interleaved &
    options:display-all,line-numbers,ignore-unimportant &
    output-to:"%3" output-options:html-color "%1" "%2"

    We are passing the file names as parameters, for starting files comparison is done successfully

    Then we are using "C:\BCompare.exe" /qc "C:\Left File.csv" "C:\Right File.csv" to generate the exit code and check match/mismatch.

    So by doing this beyond compare is called twice ,once for comparison and generating file and next during quick compare for exit code.

    So does it automatically closes the sessions each time or do we need to close it through script?

    Also please let us know if there is any other approach which we would follow for comparison and exit code.

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,677

    Default

    Everything you listed appears to be correct.

    If you run a script from the command prompt while logged in, BC will display a scripting progress window. If you don't want anything to display while the script is running, use the /silent command line switch.

    "C:\BCompare.exe" /silent "@C:\My Script.txt" "C:\Left File.csv" "C:\Right File.csv" "C:\Result.csv"
    Chris K Scooter Software

  5. #5
    Join Date
    Jan 2017
    Posts
    11

    Default

    Thanks Chris for the reply.

    Just one more question so there is no need to explicitly close the BC sessions right?Below are the commands we are executing.

    "C:\BCompare.exe" /silent "@C:\My Script.txt" "C:\Left File.csv" "C:\Right File.csv" "C:\Result.csv"

    "C:\BCompare.exe" /qc "C:\Left File.csv" "C:\Right File.csv"

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,677

    Default

    Yes, the BC sessions close automatically when you run a script with /silent or use the /qc command line switch.
    Chris K Scooter Software

  7. #7
    Join Date
    Jan 2017
    Posts
    11

    Default

    Thanks Chris for the update

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •