Results 1 to 8 of 8
  1. #1
    Join Date
    May 2015
    Posts
    11

    Default 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. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,953

    Default

    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

  3. #3
    Join Date
    May 2015
    Posts
    11

    Default

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

  4. #4
    Join Date
    May 2015
    Posts
    11

    Default

    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?

  5. #5
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,953

    Default

    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

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,953

    Default

    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

  7. #7
    Join Date
    May 2015
    Posts
    11

    Default

    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?

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,953

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •