How to one move folders and files across sites and document libraries in SharePoint and maintain their version histories

sharepoint

I'm trying to move folders across sites within the same SharePoint 2007 installation. A crucial requirement is maintaining the version history.

One approach I've tried is creating a new document library in the origin site and moving the folders into that, then moving the document library to the destination site. I've done the file move using cut-and-paste in Explorer view.

Unfortunately, it mangles the version histories of the files – each version in the history of a file ends up with the same date (and who knows where the date comes from – it's not in the original history of the file), though the Modified By and other metadata is fine.

I've used the following to move the document libraries:

  • SP Content Deployment Wizard 1.1 by Chris O'Brien (site)
  • STSADM.exe using Gary Lapointe's extensions (site), the following commands in particular: gl-exportlist, gl-importlist, gl-copylist.

Unfortunately, these tools don't work at a folder level.

My next move is to look at programming a solution, something I've been avoiding because I'm new to SharePoint and know nothing about programming for it.

Can anyone help me? Specifically, I'd welcome:

  • Any advice on how to perform the move without programming a custom solution
  • Any suggestions of tools that can do this, free or not (all I've looked at so far is AvePoint's DocAve, which can only manage content at a site-level, so it can't help me)
  • Any tips, articles, code, etc. that could help me develop a custom solution.

Thanks very much.

Best Answer

What you need to do is not supported by SharePoint, along with a many other cross-site and cross-farm operations. Let us hope this will improve with future releases.

You should check out products from AvePoint. They have many of these capabilities and more, but are reputed to be expensive. They provide an API if you do not have qualms about 3rd party dependencies. You mentioned that DocAve is single-site only but that is not the case. You might want to contact the company to learn more.

The programming approach requires you to build all your own scaffolding using the object model API or the web service API. The web service API is easier to use and allows your code to be more location independent, but it lacks too many features if you need a fine level of control. In addition to files and folders you need to worry about users, content types and any other list item your application needs.

The object model approach requires the code to run on a machine that is a member of the farm. This means you will need a local "agent" in a multi-farm deployment and create the associated distribution logic.

All this may sound daunting and while it is not trivial but can be done.