Announcement

Collapse
No announcement yet.

Script seems not to sync

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

  • Script seems not to sync

    My script seems to scan, but not to sync my folders.

    I have the following script to backup my disk:
    # Turn logging on
    log verbose "C:\mirror.log"
    # Set comparison criteria
    criteria timestamp size
    # Exclude certain folders and files
    filter "-!!!!!*\;-!!!!!*;-!!!!!*.*;-ZZZZZ*\;-ZZZZZ*;-ZZZZZ*.*;thumbs.db"
    # Load the base folders
    load "C:\Documents" "E:\Backup\C\Documents"
    # Make the target identical to the source includes deleting files that only exist on the target side
    option confirm:yes-to-all
    sync mirror:lt->rt
    # Load the base folders
    load "D:\Documents" "E:\Backup\D\Documents"
    # Make the target identical to the source includes deleting files that only exist on the target side
    option confirm:yes-to-all
    sync mirror:lt->rt

    I run the script on command line:
    "C:\Program Files\Beyond Compare 4\BCompare.exe" @"C:\mirror.txt"

    It starts properly:
    12.06.2018 07:29:27 >> # Turn logging on
    12.06.2018 07:29:27 >> log verbose "C:\mirror.log"
    12.06.2018 07:29:27 >> # Set comparison criteria
    12.06.2018 07:29:27 >> criteria timestamp size
    12.06.2018 07:29:27 >> # Exclude certain folders and files
    12.06.2018 07:29:27 >> filter "-!!!!!*\;-!!!!!*;-!!!!!*.*;-ZZZZZ*\;-ZZZZZ*;-ZZZZZ*.*;thumbs.db"
    12.06.2018 07:29:27 >> # Load the base folders
    12.06.2018 07:29:27 >> load "C:\Documents" "E:\Backup\C\Documents"
    12.06.2018 07:29:27 Load comparison: C:\Documents <-> E:\Backup\C\Documents
    12.06.2018 07:29:27 >> # Make the target identical to the source includes deleting files that only exist on the target side
    12.06.2018 07:29:27 >> option confirm:yes-to-all
    12.06.2018 07:29:27 >> sync mirror:lt->rt
    12.06.2018 07:29:48 >> # Load the base folders
    12.06.2018 07:29:48 >> load "D:\Documents" "E:\Backup\D\Documents"
    12.06.2018 07:29:48 Load comparison: D:\Documents <-> E:\Backup\D\Documents
    12.06.2018 07:29:48 >> # Make the target identical to the source includes deleting files that only exist on the target side
    12.06.2018 07:29:48 >> option confirm:yes-to-all
    12.06.2018 07:29:48 >> sync mirror:lt->rt
    12.06.2018 07:40:54 Script completed in 11 minutes, 27 seconds

    But the script seems on to scan the directories but not to sync them. The latest data are not copied to the backup folder.

    Has anybody an idea what I am doing wrong?

  • #2
    Hello,

    To test, I would suggest opening this in a new, blank Folder Compare (folder pair), then paste the filter directly into the toolbar without quotes:
    -!!!!!*\;-!!!!!*;-!!!!!*.*;-ZZZZZ*\;-ZZZZZ*;-ZZZZZ*.*;thumbs.db
    Hit enter to apply.

    What is shown in the comparison? If you then use the Actions menu -> Synchronize -> Mirror Left to Right, what does it show for the preview?

    The most common issue if nothing is synching is that the filter is removing all items, or the criteria shows no differences.
    Aaron P Scooter Software

    Comment


    • #3
      Dear Aaron,
      thanks for the debugging procedure. I found the error. The minus was missing in front of thumbs.db, i.e. -thumbs.db is the correct expression.
      Regards, Stefan

      Comment


      • #4
        Hah! I specifically looked for that issue and missed it myself while reading your filter. It's easy to do. Glad you found it and got it working.
        Aaron P Scooter Software

        Comment

        Working...
        X