No announcement yet.

Compare Ear File Content

  • Filter
  • Time
  • Show
Clear All
new posts

  • Compare Ear File Content

    Is there a completed script to compare the contents of two ear files?

    I see discussion and snippets using "expand all" and "folder compare".

    I basically want a list of jars that are identical or different.

    Additionally, optionally, a list of jar contents that are same or different

  • #2

    You'll want to choose whether to treat jar's as files (where the jar itself, when scanned in its entirety, is equal) or if you want to treat them as folders.

    If treated as folders, you can load two folders containing jars (or the jars themselves) in the Folder Compare session. I recommend doing in this in the graphical interface before attempting script.

    Once loaded in the graphical interface, use the Edit menu -> Expand All command to expand all of the archive/jar files, showing their contents. You can then generate a report from the Session menu -> Folder Compare Report.

    Is a timestamp/size scan a detailed enough scan for the comparison? If not, you can enable a binary scan in the Session menu -> Session Settings, Comparison tab.

    Once you have the report style, layout, and options set in the graphical interface, please let us know and we can help you setup the script. One basic example would be, bcscript.txt:
    load "c:\folder1" "c:\folder2"
    expand all
    folder-report layout:side-by-side output-to:"c:\bcreport.txt"

    called from the command line with:
    bcompare.exe "@c:\bcscript.txt"
    (documented in our Help file -> Using Beyond Compare -> Automating with Script section).
    Aaron P Scooter Software