No announcement yet.

sync multiple machines via script

  • Filter
  • Time
  • Show
Clear All
new posts

  • sync multiple machines via script

    I'm a Beyond Compare newbie and I've been researching the scripting functionality, but I definitely need some help.

    We have a file server with approximately 10 gigs of data. We also have 20+ users that need every file on this file server sync'd to their machine every night (updates, additions, deletions). In addition, we would like to have a report that details if a particular machine did not get updated (not on network, not tunred on, network error, etc). I have a few questions.

    Is this possible to do this via a script that runs automatically?
    Is is better to PUSH the data to all 20+ machines (have script run on server), or PULL the data from the server (have script run on each individual machine)?

    I'm currently testing out some functionality, but if anyone has some examples, hints, suggestions, they would be MUCH appreciated.


  • #2

    As long as the current user and BC3 have access to the left and right locations, you can run on either. For user directories, this is trickier to setup when pushing, but if you can elevate BC3 to have access it should work.

    I would recommend all tests be initially done in the graphical interface. This way you can see a preview of the action before committing. By design, script does not preview and runs automatically, and BC3 does not support an Undo. It is recommended to test on test folders first while learning the application.

    The log would help indicate if a script failed to load base folders (a connection was offline or otherwise not able to load) or show which files transferred. The log can have a variable amount of detail (Normal or Verbose in scripting). Scripting is documented in the Help file -> Using Beyond Compare -> Automating with Script, and in the Scripting Reference chapter.
    Aaron P Scooter Software


    • #3
      Thanks Aaron. I tested out sync-ing a server's files with 2 different tablets that were on the same network. After I created 2 different folder compares within the BC3 GUI (one for each tablet). I created a script similar to this:

      # Turn verbose logging on.
      log verbose append:"C:\TDLLogs\TDLLog_%date%.txt"

      load "Laptop_to_TabletA_Compare"
      sync mirror:left->right

      load "Laptop_to_TabletB_Compare"
      sync mirror:left->right

      Worked like a champ!


      • #4
        That's great.

        As a tip, if any load fails, the entire script will fail because it is a fatal error.

        However, if you make multiple scripts, each would individually fail:

        log verbose append:"C:\TDLLogs\TDLLog_%1_%date%.txt"
        load "%1"
        sync mirror:left->right

        where the command line used is:
        bcompare.exe @script.txt "Laptop_to_TabletA_Compare"
        bcompare.exe @script.txt "Laptop_to_TabletB_Compare"
        Aaron P Scooter Software


        • #5
          Genius! You read my mind. I was wondering if there were some command line feature that would "continue" if the first tablet was not on the network during the time the script ran.

          I created a .bat file that has this as its content:

          bcompare.exe @script.txt "Laptop_to_TabletA_Compare" /silent
          bcompare.exe @script.txt "Laptop_to_TabletB_Compare" /silent

          I can run the .bat file once and it parses through each tablet. If one tablet is not on the network, it fails (and adds an entry to the log), and then moves on to the next tablet.

          Thanks again!