Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2014
    Posts
    3

    Default 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.

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

    Default

    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

  3. #3
    Join Date
    Jul 2014
    Posts
    1

    Default

    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.

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

    Default

    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

  5. #5
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,916

    Default

    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

Posting Permissions

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