Announcement

Collapse
No announcement yet.

Quick compare on folders from command line

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

  • Quick compare on folders from command line

    Hello all

    Is it possible to do a quick compare on two folders from the command line? Or am I going to have to write a Beyond Compare script to do this? If I have to use the scripting language can I set the ERRORLEVEL then exit?

    Many thanks in advance

    Lee Russell

  • #2
    Hello,

    Our /quickcompare or /qc command line arguments only accept files. A folder comparison would require the use of scripting which can generate a folder-report. You can use a bat file or another application to parse the report and set %ErrorLevel% based on the contents of the report.

    What types of expected values would you want to see in a quickcompare of a folder? Whether All files were equal, or if some were different, or if all differences found were unimportant?
    Aaron P Scooter Software

    Comment


    • #3
      I was looking to set an errorlevel if any differences were found. So something pretty simple, i.e. set errorlevel to 1 if any differences found, elsewise set it to zero.

      I can write the batch file side of it, I just need to figure out the Beyond Compare Scripting now...

      Thanks

      Lee

      Comment


      • #4
        Hello,

        Detailed documentation can be found in the Help file under the Scripting Reference section, or under Using Beyond Compare -> Automating with Scripts.

        The basics would be to:
        load "c:\folder1" "c:\folder2"
        folder-report layout:xml output-to:"c:\output.xml"

        One of the folder-report types is an XML type for easier parsing.
        Aaron P Scooter Software

        Comment

        Working...
        X