Export Session to a Bash Script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • warrenweiss
    New User
    • May 2014
    • 1

    Export Session to a Bash Script

    Is it possible to save a Folder Sync session as a bash script (with auto-sync)?

    I see it's possible to save a session as an XML file.

    TIA
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Beyond Compare can't automatically generate a script from a session. However, you can automate Beyond Compare by writing a script.

    See the "Using Beyond Compare > Automating With Scripts" and "Scripting Reference" topics in Beyond Compare 3's help file for details on scripting.

    Here's an example script to sync folders left to right:

    load c:\folder1 c:\folder2
    sync update:left->right

    Save it as a text file, then run it using the following command line:
    bcompare @c:\script.txt

    The @ character tells Beyond Compare to run a file as a script rather than load it for interactive comparison.

    Since you referenced Bash, if you're running Beyond Compare for Linux, be aware it requires an X-Windows session to run, even for scripts. This means a Beyond Compare script won't run as a Cron job. Beyond Compare for Windows scripts run fine using the Windows Task Scheduler without an interactive user logged in.
    Chris K Scooter Software

    Comment

    • Thibaultmol
      New User
      • May 2014
      • 2

      #3
      I have been annoyed by the fact that I have to make a script instead of using the GUI to generate one from a session.
      Just a question: Why can't it generate a script from a session?

      Comment

      • Chris
        Team Scooter
        • Oct 2007
        • 5538

        #4
        Scheduling syncs and generating scripts from the GUI are both on our wish list for a future version of Beyond Compare, but are not supported in Beyond Compare 3.3.10.
        Chris K Scooter Software

        Comment

        • qqq200kg
          Visitor
          • Aug 2018
          • 4

          #5
          hi Chris, is it supported now, it's 2018 now, haha~

          Comment

          • Chris
            Team Scooter
            • Oct 2007
            • 5538

            #6
            Sorry, Beyond Compare can't export a session from the GUI. To automate Beyond Compare, you'll have to write a script. See Beyond Compare's help files for information about scripting.
            Chris K Scooter Software

            Comment

            Working...