Announcement

Collapse
No announcement yet.

Problem with Sync for files in subfolders

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

  • Problem with Sync for files in subfolders

    BC seems to have a problem when using the SYNC function with files in subfolders to the specified target. Newer files under the main folder are copied with no problem, but newer files under subfolders are frequently not copied. Repeated runs usually copied a few files, but not all. Rarely, all subfolder were copied, and sometimes none. My best guess at this point is that there is problem syncing subfolders to the main target folder.

    I am able to copy the newer files in subfolders reliably only by specifying a sync for each subfolder. Fortunately, I only have to deal with one level of subfolders!


    The script I'm running is pretty simple:

    BC2.exe @"\\netdrive\netshare\folder1\scriptfile.txt"


    ---scriptfile.txt---
    load %CurrBuildPath% "C:\Program Files\folder\folder"

    option confirm:yes-to-all
    Log verbose append:"C:\Program Files\Beyond Compare 2\log.txt"

    sync update:lt->rt


    ----adding lines like these reliably copies new files from a specified subbolder.. \Rates ---------

    load %CurrBuildPath%\Rates "C:\Program Files\folder\folder\Rates"
    option confirm:yes-to-all
    Log verbose append:"C:\Program Files\Beyond Compare 2\log.txt"
    sync update:lt->rt

  • #2
    Re: Problem with Sync for files in subfolders

    The script should copy files at any depth in the folder structure.

    Do all of the files have timestamp differences? The "sync update" command will only copy orphan files and files with newer timestamps. If the files have some other type of difference, or if you don't have timestamp comparison turned on, that might explain why some files aren't being copied.

    It might help to specify comparison criteria before your load command.

    Try adding "criteria timestamp" before the load line.

    If you want the target to be identical to the source, including deleting files that only exist on the target side, use the "sync mirror" command instead.

    Also, if it is missing empty folders, you can copy them by changing the command to "sync create-empty update:lt->rt".
    Chris K Scooter Software

    Comment


    • #3
      Re: Problem with Sync for files in subfolders

      All of the files do have different timestamps.

      Adding "criteria timestamp" before the load line did work.
      The scripting reference does say that this will enable timestamp compare, but that would seem to be the default.

      What is strange is that some of the files from the subfolder would be copied...and one time 3 would be copied, another time 6, another 5...out of 25 or so newer files. I ran the copy several times first restoring the OLD files, then batch "sync" to copy the newer files. Each time with slightly different number of files copied from the subfolder.

      It was also interesting that as long as I specified the subfolder, the files were copied fine.

      We did not want to use the mirror option, becuase there can be certain files (case files) updated by the user that will be newer and/or unique on the local machine and we don't want to delete.

      Thanks for the quick response!!

      Comment


      • #4
        Re: Problem with Sync for files in subfolders

        As far as I know it should sync without specifying subfolders individually.

        If you would like me to investigate this further, please send a copy of your script, a screen shot of your files in BC, and a zip of your settings using Help|Support and the Export button to support@scootersoftware.com.
        Chris K Scooter Software

        Comment

        Working...
        X