BComp Quickcompare errorlevel always 0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karpagav
    Visitor
    • Jan 2014
    • 3

    BComp Quickcompare errorlevel always 0

    Hi

    I am using Beyond compare 3 on trial version. I am trying to execute the below script in my commandline

    BComp.com /silent /qc @"D:\commonbc\runscript.txt"

    My Operating system is Windows Server 2012 64 bit

    I have attached the script file.


    The problem is the DOS error level always returns 0 even though the input files have conflict. Expected codes are not returned.
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    The /qc command line switch isn't supported when running a script. It only works by itself for comparison of a pair of files. It does not support comparing folders.

    Example command line:

    bcomp.com /qc c:\file1.txt c:\file2.txt

    To display the error level for testing, use the following in a batch file:
    bcomp.com /qc c:\file1.txt c:\file2.txt
    echo %errorlevel%
    Chris K Scooter Software

    Comment

    • MTB181205
      New User
      • Jul 2014
      • 1

      #3
      Hello,

      i am having a similar problem and hopefully you can help me. I dindt wanted to start a new thread, because the topic is the same.

      I am using an ANT-Script to compare multiple folders. I would like to inorm when there were differences found. However it seems that i alwas get '0', altough there are many differences.

      This is a snippet from my script:
      <target name="compare" depends="createFoldersForComparison">
      <createComparisonConfiguration configFileProperty="comparisonConfigFile" resultFileProperty="comparisonResultFile"/>
      <exec executable="${beyondCompareExecutable}" resultProperty="comparisonExitCode" failOnError="false">
      <arg value="@${comparisonConfigFile}"/>
      <arg value="/silent"/>
      </exec>

      The property 'comparisonExitCode' seems to be always '0'.

      Thanks in advance.

      Greetings.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 15997

        #4
        Hello,

        As Chris mentioned, BC3 can run in one of two automated modes:
        @scriptfile.txt
        or
        /quickcompare

        Running in a script mode does not return a status message based on the type of commands that can be run; it uses the codes to indicate Script Success or a failure state of some sort. The folder-report or text-report commands the script can generate is used for reporting.

        /quickcompare uses the ErrorLevel to indicate the results of a scan between two files.

        If you need to perform both script steps and also get an error level, you would need to run both commands separately (or, parse the generated report.txt and create your own error level return codes).
        Aaron P Scooter Software

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 15997

          #5
          Also, is your BCompare executable pointing to BComp.com? This is often required to have the .com object hold and display the errorlevel on the command line.

          If you have any questions, it would help if we could see the variables filled in with the appropriate values, and know what the scriptfile.txt contained.
          Aaron P Scooter Software

          Comment

          Working...