Announcement

Collapse
No announcement yet.

Auto Sync in Folder Sync

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

  • Auto Sync in Folder Sync

    I can't figure it out for the life of me. Maybe it's not even an option. I have a Folder Sync session. I would like for it to Automatically Sync after it preforms the Auto Refresh.

    How can i achieve this?

  • #2
    Auto Refresh does not trigger an automatic sync of your folders. It will refresh your display, letting you know if there are new items to sync. An automatic sync option is on our wishlist.

    You can use script to trigger a sync as a windows scheduled task. This is outside of the GUI. You would create a basic script file (detailed documentation can be found in the Help file under Using Beyond Compare -> Command line and scripting), then run the script with the command line: bcompare.exe @scriptfilename.txt

    A simple script could be:
    log verbose "c:\logs\logfilename.txt"
    load sessionName
    sync update:lt->rt

    This command line can be triggered from a Windows Scheduled Task that runs automatically.
    Aaron P Scooter Software

    Comment


    • #3
      When i try doing that i get an error.
      Loaded Session must be Folder Compare Session.

      Mine is a Folder Sync Session. Do i have to convert it or are there separate script commands for my type of session?

      Comment


      • #4
        There aren't separate script commands for folder sync sessions, so you'll need to save a folder compare session to load in your script.
        Chris K Scooter Software

        Comment


        • #5
          I just got tripped up by this, too. Happily, I found this answer in just a few minutes, thanks to this forum! Since the command line accepts the sync session name, I think we only lack a command switch like /autosync and that would do the trick: bcomp /autosync "MySyncSession"

          Comment


          • #6
            dbrower,

            Thanks for the suggestion. Making it easier to schedule syncs is on our list for a future version of Beyond Compare.
            Chris K Scooter Software

            Comment


            • #7
              Team Scooter,

              After reading this forum I am a little lost. On the one hand we have Aaron showing a sample script that answers the question of Auto Sync in Folder Sync, but then we have Chris saying this will be a new feature. Which is it?

              I tried to perform the script shown by Aaron and I get the same error message:

              Loaded Session must be Folder Compare Session.

              Did anyone figure out a way around this?

              the script i tried:
              log verbose "c:\autosync\autosync_log.txt"
              load thumphrey_backup
              sync update:lt->rt

              Comment


              • #8
                Hi Tom,

                It is possible to automate a synchronization, it just isn't easy in the current BC3.0.15. Making it easier is the new feature I was talking about.

                In BC3, it isn't possible load a saved "Folder Sync" session in a script. If you load the folders in the "Folder Compare" and save it, you can load the saved Folder Compare session in a script.

                Once you have the script working, you can schedule it using the Windows Task Scheduler.
                Chris K Scooter Software

                Comment


                • #9
                  So it seems like this still has not been resolved as I saved a sync session, and then want to load it in my script via the load command and still get the "Loaded session must be Folder Compare session". (using v 3.3.1)

                  Thats a limitation of sessions.

                  So I take it the only way to script this sync is to just do all of the sync stuff explicitly in the script after loading the default session:


                  So while it would be great to be able to do:
                  log normal C:\temp\BeyondCompare-Sync-Log.txt
                  load "SyncProjFolders"
                  sync update:all

                  What we have to do (since the saved sync session called SyncProjFolders is a sync session).. is use the default session and explicitly define the stuff that would have been saved in the session:

                  log normal C:\temp\BeyondCompare-Sync-Log.txt
                  load <default>
                  filter "-*.o;-*.lo;-*.la;-*.al;-.libs;-*.so;-*.so.[0-9]*;-*.a;-*.pyc;-*.pyo;-*.rej;-*~;-#*#;-.#*;-.*.swp;-.DS_Store;-*.ncb;-*.suo;-*.obj;-*.idb;-*.*.*.user;-Debug\;-Release\;-Debug-*\"
                  load C:\_Projects E:\
                  sync update:all
                  Last edited by Minok; 24-Aug-2011, 06:19 PM.

                  Comment


                  • #10
                    It still isn't possible to load a Folder Sync session, but you can load a Folder Compare session. You can also convert a Folder Sync session to a Folder Compare session using the graphical interface. First, load the sync session. Then in the Session menu -> Compare base folders. This opens a new tab with the folders and most session settings already set up as a Folder Compare session type. Save this session, then use your first script example to load it by name, and perform the sync command.
                    Aaron P Scooter Software

                    Comment


                    • #11
                      Originally posted by Aaron View Post
                      It still isn't possible to load a Folder Sync session, but you can load a Folder Compare session. You can also convert a Folder Sync session to a Folder Compare session using the graphical interface. First, load the sync session. Then in the Session menu -> Compare base folders. This opens a new tab with the folders and most session settings already set up as a Folder Compare session type. Save this session, then use your first script example to load it by name, and perform the sync command.
                      mmm... I really just don't get the difference between Folder Compare and Folder Sync; aren't they tha same kind of comparison?
                      What's the meaning for 2 different kind of session types?

                      Thank you!

                      Best regards,
                      Camillo

                      Comment


                      • #12
                        A Folder Compare is a session type designed for viewing and comparing a pair of folders and all of their content. There are many, many options for narrowing the view and directly interacting or taking action on a specific selection. Sync tools are a small subset of the Folder Compare.

                        A Folder Sync session takes the commonly performed sync action and makes it its own session type. It provides a Preview pane that updates in real time to show which files the sync will interact with and how. The Sync is always on the entire folder, and does not use the current selection. The sync is designed as a quick/easy preview with a one-button "Sync now" solution to easily setup and sync files/folders without extraneous options that do not directly impact the sync.
                        Aaron P Scooter Software

                        Comment


                        • #13
                          Does this sample script actually sync?

                          Regardingthe sample script above, will this sync everything from left to right, and does it include subfolders? I just ran it and it didn't seem to actually sync, it finished in a little over a second.

                          Thanks, Bon

                          Comment


                          • #14
                            Hello,

                            Sync Update will copy any Newer or Orphan files in the direction of the sync. I would recommend first loading the graphical interface and load your two folders in the Folder Sync or Folder Compare session. This would let you preview how the comparison is running and which files are marked as Newer and Orphan. Once the sync is working there as you expect, we can then help with the script that will run the same type of sync.

                            I would suggest testing with sample or test files, since our sync, copy, delete, etc actions are not Undo-able.
                            Aaron P Scooter Software

                            Comment


                            • #15
                              Originally posted by Aaron View Post
                              It still isn't possible to load a Folder Sync session, but you can load a Folder Compare session. You can also convert a Folder Sync session to a Folder Compare session using the graphical interface. First, load the sync session. Then in the Session menu -> Compare base folders. This opens a new tab with the folders and most session settings already set up as a Folder Compare session type. Save this session, then use your first script example to load it by name, and perform the sync command.

                              Aaron/Scooter Staff,

                              Sorry to bounce an old post but I am wondering if this was ever resolved and you can run Folder Sync sessions from the Task Scheduler now? Doing a folder compare doesn't seem to cover all the "Sync/Action/Presets:" unless I'm missing something.

                              Please enlighten,
                              Brian

                              Comment

                              Working...
                              X