Announcement

Collapse
No announcement yet.

act on folder comparison result

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

  • act on folder comparison result

    Hi,

    I've been trying to find an example script on what I need but to no avail. I hope you can assist me.

    I am using BC3 and I need to compare 2 input folders with 1 output folder. For example, if the folder comparison result tells me that 1 file on the left is different from the right, I will copy the file from the left to the output folder. If another file is the same on both left and right folders, don't copy to the output folder. And so on. Is this doable through a script? I am using Windows7.

    Thanks in advance!

  • #2
    Hello,

    Yes, I would suggest using a combination of selection commands and the copyto command to copy to a target. For example:
    load "c:\folder1" "c:\folder2"
    expand all
    select left.diff.files left.newer.files left.orphan.files
    copyto left path:base "c:\outputfolder"

    What should the selection be? Would you want to copy files on the left that are Older than a Newer.Right file? Are you only copying Left differences to the Output folder?

    It might also help to load the graphical interface Folder Compare, and load c:\folder1\ and c:\folder2\ so you can review how the comparison loads and how files align (so you can review the comparison criteria).
    Aaron P Scooter Software

    Comment


    • #3
      Wow, it worked! And I didn't expect it to be that simple! Thanks a lot for the advice.

      Comment

      Working...
      X