Quick compare on folders from command line

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leeerussell
    New User
    • May 2010
    • 2

    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
  • Aaron
    Team Scooter
    • Oct 2007
    • 15997

    #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

    • leeerussell
      New User
      • May 2010
      • 2

      #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

      • Aaron
        Team Scooter
        • Oct 2007
        • 15997

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