No announcement yet.

Scripting saved sessions

  • Filter
  • Time
  • Show
Clear All
new posts

  • Scripting saved sessions

    I have two update to right sessions setup, and saved the sessions. I would like to run the specific sessions as an automated task.

    Can this be done?

    If not what command line would I need to run for the following:
    "\\\AraxiVolume_HW30287-85_J\Jobs" update to right to "\\\Prinergy\jobs"
    Filters: -.DS_Store*;-._*;-.*;-.DS_Store*\;-._*\;-.*\;-~*\

    "\\\AraxiPreps\Templates" update to right to "\\\Prinergy\Templates"
    Filters: -.DS_Store*;-._*;-.*;-.DS_Store*\;-._*\;-.*\;-~*\


  • #2
    You can load saved Folder Compare sessions in a script, but Folder Sync sessions can't be loaded in a script.

    Here's an example script to automate a sync:

    log verbose c:\log.txt
    filter: -.DS_Store*;-._*;-.*;-.DS_Store*\;-._*\;-.*\;-~*\
    load "\\\AraxiVolume_HW30287-85_J\Jobs" "\\\Prinergy\jobs"
    sync update:left->right
    load "\\\AraxiPreps\Templates" "\\\Prinergy\Templates"
    sync update:left->right

    To run the script, use the command line:
    "c:\program files\beyond compare 4\bcompare.exe" "@c:\script.txt"

    To run the script on a schedule, follow the Scheduling a Script instructions in Beyond Compare 4's help file. See also the "Using Beyond Compare > Scripts" and Scripting Reference topics in Beyond Compare 4's help file for more information.
    Chris K Scooter Software


    • #3
      Originally posted by Chris View Post
      You can load saved Folder Compare sessions in a script, but Folder Sync sessions can't be loaded in a script.
      I get how to load two directory roots in a script and then run a sync:
      load c:\folder1 c:\folder2
      sync update:left->right

      But how do I load a folder sync session and then sync:
      log verbose append:"C:\tmp\backup-log.txt"
      criteria timestamp size
      load "Backup Session With Exceptions For Locked Files"
      sync create-empty mirror:left->right

      The above script file responds with "Fatal Scripting Error: Loaded session must be Folder Compare session"

      It seems that scripts can't handle sync sessions, but it seems to me those are the most likely sessions to appear in a script (for doing a nightly backup to a network drive). Am I missing something? Or am I thinking about this use case all wrong?


      • #4

        Scripting only supports loading a saved Folder Compare session, not a Sync session. Sync Sessions offer a subset of commands than a Folder Compare to give a large Preview and simpler view, while a Folder Compare has the Sync commands as well. If you load your Sync session in the interface, you can copy it to a Folder Compare with the Session menu -> Compare Base Folders, then save this new tab Folder Compare to use for scripting.
        Aaron P Scooter Software