Script to dif folder and copy different files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pmaneely
    New User
    • Aug 2015
    • 1

    Script to dif folder and copy different files

    I'm new to BC3 Scripting. I need a script that will compare two folder and the files that are newer in one folder, need to be copied to the folder with the older files. How do I do this. Below is my feeble attempt!

    load "C:\Folder1" "C:\Folder2"
    expand all
    select left.newer
    copy left->right


    Thanks for your valuable time
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    The above script will work, but you can do it with less commands using the sync command.

    load c:\folder1 c:\folder2
    sync update:left->right

    The sync command will copy orphan files from folder1 to folder2 and files that exist on both sides but have newer modified dates in folder1 to folder2.
    Chris K Scooter Software

    Comment

    Working...