No announcement yet.

Compare folders, then copy everything

  • Filter
  • Time
  • Show
Clear All
new posts

  • Compare folders, then copy everything

    Lets say I have two folders as shown below.

    folderA [1100 bytes] folderB [1000 bytes]
    |- file1.txt [100 bytes] |- file5.txt [200 bytes]
    |- file2.txt [200 bytes] |- file2.txt [300 bytes]
    |- file3.txt [800 bytes] |- file7.txt [500 bytes]

    This is what I would like to happen. When I compare folderA to folderB, I want BC to figure out only that the two folders are different (either based on folder size, or folder timestamp) and copy folderA to a different location.

    Here is the script that I am using:

    option confirm:yes-to-all
    criteria rules-based
    load folderA folderB
    expand all
    select left.diff.folders
    copyto left path:base %1
    It seems like BC is not diffing at the folder level. It wants to compare the files. How can I tell BC to only compare folders, and if there is a difference do something. I don't care about what files are in the folders.


  • #2

    Thanks for contacting us. BC3 compares file size and timestamp, but not the folder size or timestamp. The folder then inherits the status of the files inside. Scripting logic currently will mark a diff.folder only if all of the files inside are different. Unfortunately, there is not a workaround for your workflow at this time. It can be a bit tricky to make changes to script, since changing the logic will break any older scripts users may be using, but I've made a wishlist entry to look into this.
    Aaron P Scooter Software