No announcement yet.

Return ExitCode

  • Filter
  • Time
  • Show
Clear All
new posts

  • Return ExitCode


    We are using Beyond compare to generating text reports.

    My question is when we generate report with two text files, how we will get the return code with specific value that tells both files were same or there are changes in both file.

    We are using portable install and below is the command line we are sending.
    We have used "/silent" while generating command

    C:\BCompare.exe /silent @"Formate.txt" "RightFile.txt" "LeftFile.txt" "Result.html"

    Also Used "/qc" command

    C:\BCompare.exe /qc @"Formate.txt" "RightFile.txt" "LeftFile.txt" "Result.html"

    in both case we are getting ExitCode 0.

  • #2

    In automation, you would want to use either /qc (quickcompare) or scripting (@scriptfile.txt). Scripting return codes are used to determine script run success. /qc return codes return the file pair's comparison.

    You likely also need to use BComp.exe or as part of your automation to help with waiting to read the %ErrorLevel% variable. To test, I would suggest first using the Windows Command Line calling to: /qc "LeftFile.txt" "RightFile.txt"
    echo %ErrorLevel%

    If you also need a Report, then follow that with your call to scripting:
    bcompare.exe "@c:\script.txt" "leftfile.txt" "rightfile.txt" "Result.html"

    While your script could present the files in any order, when calling from the command line, the left file is the first parameter ("bcompare.exe left right" to launch and verify in the graphical interface).
    Aaron P Scooter Software