Announcement

Collapse
No announcement yet.

Ignore files in left folder or right folder or both plus show file differences

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

  • Ignore files in left folder or right folder or both plus show file differences

    How do I script this?

    I want to recursively compare two folders and depending on the situation have following output

    Show files/folders only in left folder and show files/folders only in right folder and show different files
    Show files/folders only in left folder and different files
    Show files/folders in only in right folder and different files
    Show different files only

  • #2
    Hello,

    These would be 4 different report files, which you can trigger sequentially on a loaded pair of folders. Similar to the graphical interface, where you would load the folder pair, then generate each of the 4 reports, script will step through these steps.

    load "c:\folder1" "c:\folder2"
    expand all
    folder-report layout:side-by-side options:display-mismatches output-to:"c:\bcreport\OrphansAndDifferent.html" output-options:html-color
    folder-report layout:side-by-side options:display-left-newer-orphans output-to:"c:\bcreport\LeftOrphansAndDifferent.html" output-options:html-color
    folder-report layout:side-by-side options:display-right-newer-orphans output-to:"c:\bcreport\RightOrphansAndDifferent.html" output-options:html-color
    folder-report layout:side-by-side options:display-mismatches-no-orphans output-to:"c:\bcreport\DifferentWithNoOrphans.html" output-options:html-color

    You can then execute a script with the command line:
    bcompare.exe "@c:\bcscript.txt"

    You can find the different report parameters documented in our Help file -> Scripting Reference. More detailed overview instructions are found in the Help file -> Using Beyond Compare, Scripting
    Aaron P Scooter Software

    Comment


    • #3
      Will "options:display-left-newer-orphans" show files in left which are older than right?

      Comment


      • #4
        Can I pass in "folder-report layout:side-by-side options:display-mismatches-no-orphans output-to:"c:\bcreport\DifferentWithNoOrphans.html"" as a variable in batch script?

        Comment


        • #5
          No, this report option will show Newer Left files and Orphan Left files. To get Newer and Older, you could use the Differences report which would include Orphans on the Left and Right. Or For more gradient control, you could generate a single XML report, then use a parse to parse out the information you need into other files.
          Aaron P Scooter Software

          Comment


          • #6
            Yes, you can pass any text into script from the command line, as documented in the Help file -> Using Beyond Compare -> Scripting. You probably do not need to pass the full command line, and instead an example would be:
            bcompare.exe "@:c\bcscript.txt" "display-mismatches-no-orphans" "c:\bcreport\DifferentWithNotOrphans.html"

            which would then be referenced with %1 and %2 respectively (and more could be added/used):
            folder-report layout:side-by-side options:%1 output-to:"%2"
            Aaron P Scooter Software

            Comment


            • #7
              When I use the "folder-report layout:summary options:display-mismatches" I get the following output:

              Left Newer Files (0)
              Right Newer Files (0)
              Differences Files (8)

              What do "Left Newer" and "Right Newer" report that "Differences Files" doesn't?

              Comment


              • #8
                Hello,

                Could you post your full script? Depending on if you have set the criteria, or are loading a saved session with criteria set, this can change the status of the files compared. For example, if you have criteria binary set, then timestamps are disabled, so files are only Different (not Newer or Older). If you use criteria timestamp:2sec binary then it would use both during the comparison, and files would be Newer, Older, or Different (if Binary different but Timestamps are equal).

                If you need to send us the script privately, email us at support@scootersoftware.com and include a link back to this forum thread.
                Aaron P Scooter Software

                Comment

                Working...
                X