No announcement yet.

Beyond Compare / Compare Conents

  • Filter
  • Time
  • Show
Clear All
new posts

  • Beyond Compare / Compare Conents


    I am using Beyond Compare with Script feature to compare files. I not only need to see that the files are different, but I also need to know those exact differences. Can those differences be output in a file?

    Here is my script
    text-report layout:side-by-side options:ignore-unimportant,display-context,line-numbers output-to:"c:\Temp\MyReport.txt" "c:\Temp\Folder1\Test1.txt" "c:\Temp\Folder2\Test2.txt"


  • #2

    That script looks like it is configured to show the differences with context. Did you want to show only the differences without context (surrounding equal lines)?

    We have a few difference layouts. I would recommend booting up the graphical interface, loading a Text Compare with two of your files, then go to the Session menu -> Text Compare Report. Pick a variety of Layouts, and options, and use the Printer -> Print Preview option to find the report you like best. We can then script that report to output to the printer, .txt or .html file using scripting.

    If you have two folders with many files, you can generate the same file level report on a selection. In the graphical interface, use the Folder Compare session, set your Display Filter to Show Differences, then the Edit menu -> Expand All, Edit menu -> Select All Files. This would leave you with a selection of only different files. Then use the Actions menu -> File Compare Report. If you have only text files selected, you'll see the Text Compare Report dialog. If you have different types selected, you'll see a more generic File Compare Report dialog.

    From scripting, you can follow similar steps (note, not including Orphan files, which would show all their text since the whole file is different from the other, empty side):

    load "c:\folder1" "c:\folder2"
    expand all
    select left.newer.files left.older.files left.different.files
    text-report layout:side-by-side options:display-mismatches output-to:"c:\temp\myreport.txt"
    Aaron P Scooter Software


    • #3
      Compare Contents

      Thanks for this reply.

      I am getting: "Fatal Scripting Error: Unexpected arguments(s) "left.different.files".

      Also, did you mean to say left.newer.files RIGHT.olderfiles?