PDA

View Full Version : Folder Syncing with custom settings


tnorris
29-Mar-2011, 02:56 PM
I am trying to script the comparison and syncing of two folders. I understand from the documentation that BC3 scripting sync command does not act on the currently selected files. I also understand that BC3 does not allow the loading of a folder sync session so I start with the folder compare. I do not want any of the default sync settings (i.e. mirror left to right). I prefer settings that do a no-op on time comparisons and no differences, and then sync differences and left orphans to the right and delete right orphans. I am doing a binary comparison on the files. So, how do I get my sync command to use these custom settings?

Aaron
30-Mar-2011, 09:08 AM
Hello,

The script cannot use the custom session settings setup in a Folder Sync session, but you can perform these actions individually with a combination of select and copy/delete commands (which act on the current selection). When you say "no-op", you mean you do not want to compare timestamp, and any binary different files, even older, should be copied from left to right?

For example:
criteria binary
load "c:\folder1" "c:\folder2"
expand all
select left.orphan left.diff
copy left->right
select right.orphan
delete recyclebin=yes right

tnorris
30-Mar-2011, 10:48 AM
Thanks, Aaron. You are exactly correct in your interpretation of the no-op and timestamp compare. This seems to be exactly what I need. I will try and it out and see if it solves our problem.