Announcement

Collapse
No announcement yet.

Can BComp.com in bat return errorlevel when it has differs

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can BComp.com in bat return errorlevel when it has differs

    My bat:
    PHP Code:
    set RULEDIR=%1
    set TCLDIR
    =%2
    set PSDIR
    =%3
    set OUTDIR
    =%4
    set 
    "TOOLS=C:\Program Files (x86)\Beyond Compare 4"
    "%TOOLS%\BComp.com" 
    @%RULEDIR%\rules.txt %TCLDIR% %PSDIR% %OUTDIR%
    IF %
    ERRORLEVELNEQ 0 ECHO error 
    I can see that errorlevel stays 0 ,and cannot get other values when comparing folder has differs. Did I miss something ?
    I can see DOS error values at help doc:
    0
    success
    1
    binary same
    .....
    my script txt:
    PHP Code:
    load "%1" "%2"
    expand all
    select all
    compare rules
    -based
    folder
    -report layout:side-by-side options:display-mismatches-no-orphans output-to:"%3" output-options:html-color 

  • #2
    Scripting only returns a non-zero exit code if there is an error in the script syntax. Scripts don't support returning comparison status as an exit code.

    To compare two files and return comparison status as an exit code, use the /quickcompare or /qc command line switch.

    Rules-based comparison:
    bcomp.com /quickcompare file1.txt file2.txt

    Quickcompare uses rules based comparison by default, you can pass other comparison types as part of the command line switch.

    CRC comparison:
    bcomp.com /quickcompare=CRC file1.txt file2.txt

    Beyond Compare doesn't provide a way to compare two folders and return the comparison result as a exit code. This is on our feature wish list for a future version.

    Exit codes for /quickcompare are defined in the Command Line Reference topic in Beyond Compare's help file.
    Chris K Scooter Software

    Comment


    • #3
      Thanks a lot.also, When I use scripting to compare folders,can foder report generated only when it has differs,if same no report

      Comment


      • #4
        No, but an equal report would always have the same content, which you could parse for if you needed to detect this state.
        Aaron P Scooter Software

        Comment


        • #5
          Hello,
          I also have an errorlevel problem. Should I attach here or better open a new thread?
          Thanks and regards

          Comment


          • #6
            What issue are you encountering? This thread originally dealt with that script return values only return if the script was successful. In most cases, if you are trying to evaluate two files, /qc is used instead (bcomp.com /qc c:\file1 c:\file2). BComp.com is used from the command line (instead of bcomp.exe or bcompare.exe) to hold onto the error level value, in most cases.
            Aaron P Scooter Software

            Comment


            • #7
              Hello,
              thanks so far. It sounds to me like "In most cases open a new thread. Only post here if it is exactly the same case." Even this I am not sure. So I will open a new topic.
              regards

              Comment

              Working...
              X