Synchronization Question

I have two directory structures

Source\

  • A
  • C
  • E

Target\

  • A
  • B
  • C
  • D
  • E
  • F

I would like to set up a synchronization that only syncs subdirectory trees that are in the source (A, C, E) using two way synchronization. I'm thinking this would involve walking the folder tree in some sort of script. Any ideas out there?

Switch your the Source and Destination folders around (make the one with more folders the Source). Then create a filter that matches based on location. See the screen grab below.

Be sure to inspect the proposed actions first to ensure the filter does what you want!

NOTE: The reason I recommend switching Source and Destination around is that I know there was an issue reported where a Filter only applied in one direction of two-way Synchronize operation. I do not remember it being reported as fixed in Opus 9. I'll run some tests later and report back on if this is still the case or not.

Thanks Ken, I see where that will work, but in reality I have LOTS of folders in both directories, that was just an example which is why I didn't want to have to create a match...the folder construct on source changes frequently based on which projects I'm working on (Source is my local machine, and Destination is the master server...I only want to keep copies of and synchronize folders for projects I actually am working on). I was hoping for some way to have it essentially walk a script down the high level folders on the source file and synchronize each one.

You might be able to script the Copy UpdateAll function, twice per directory. As in, copy all the newer files from left to right and then do the same from right to left, for each folder.

Unlike the sync tool, you don't get a window showing "this is what I'm about to do to your files, are you okay with that?", so it's best to thoroughly test any script which uses Copy UpdateAll to ensure it acts as you expect it to with all the possible situations.

Going off on a slight tangent, have you considered using some kind of revision control system to manage your projects? Like CVS or (better) SVN? Those are designed for syncing and merging changes, and keeping history of previous versions. They're more for text files than binary files but they work with both. (If your data is mainly binary files I think SVN will be far better than CVS. In fact, CVS is best avoided these days, although I use CVS myself as I'm more familiar with it and working on very small projects where the differences between CVS and SVN don't really matter.)

The reason I haven't looked at a revision control system is many other people update files in this directory as well. Rarely the same files which is why I've been able to get by with a simple sync. As I work out of the office however I like having copies on my laptop, as well so I don't always have to VPN in.

SVN allows secured https access from anywhere with an internet connection (assuming you've set it up that way). It also has an auto-rev feature so you can use it as a fairly simple journaling file system. Most of the users don't even need to know about revisions and branches and such. They just copy things from the storage area, work on them, and copy them back. With recent versions of MS apps they don't even have to make local copies; they can update them right in the repository.

We've been using this at work for about a year and it has worked flawlessly. When our programmers go to Japan or Korea they have the same access to the files in the repository as they do when sitting at their desk in the office. (A little slower, maybe, due to the internet connection, but they still have all the same capabilities.)