Announcement

Collapse
No announcement yet.

Select Diffs No Orphans

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

  • Select Diffs No Orphans

    Hi,

    I'd like to update files from left to right. But only modified files. I don't want to copy new files (left orphans). This option is called "Diffs No Orphans" in the UI. How do I do that from script? I can't seem to find any solution.

    thanks in advance for any hints!

  • #2
    Here's an example script:

    load c:\source c:\target
    expand all
    select left.diff.files left.newer.files left.older.files
    copy left->right

    To run the script, use the command:
    bcompare.exe @c:\script.txt

    The @ character makes Beyond Compare run a file as a script instead of loading it for interactive comparison.

    See the Scripting Reference's entry for SELECT for more information:
    https://www.scootersoftware.com/v4he...reference.html
    Chris K Scooter Software

    Comment


    • #3
      Thank you for your quick help! This solved my problem.

      Just in case anyone is interested: I need to have a data sync in two steps:
      1. Copy only newer files fron src to dst. An application is using dst, so deleting or modifying would be a problem.
      2. Delete orphans in dst, copy over modified files from src to dst. Do not copy new files (left orphans)! This is done whenever the application loads a new scene. This is supposed to be quick, so copying new files is not perfomed (this might take long and can be done while the application is running).


      Script for 1:

      Code:
      load %1 %2
      expand all
      select left.orphan.files
      copy left->right
      Script for 2:
      Code:
      load %1 %2
      expand all
      select right.orphan.all
      delete recyclebin=no right
      select all
      select left.diff.files left.newer.files left.older.files
      copy left->right
      Thanks again!

      Comment

      Working...
      X