tags:

views:

1296

answers:

5

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.

A: 

A nice PowerShell script using the CopyTo() method on the spListItem object should be a good place to start.

Kasper
According to what I've read, this won't maintain the files' metadata, which makes sense - it's making a copy of a file, not moving it.
Marc
A: 

Unfortunately, I had to code this solution when I created an archiving tool for MOSS.

A: 

Do you have publishing pages or just items. Some more skilled people in my team have had problems moving Publishing pages and dates in the version history. I think we spent 5 days trying using Timer jobs using Elevated privs , webservices etc....

Somtimes you just wished Sharepoint was a simple SQL Server application where you just need to change a field....

salgo60
I'm just dealing with files. I haven't been working with SharePoint for very long, but yes, I do wish it were more simple!
Marc
A: 

I've had success with Tzunami Deployer in this scenario. On my blog, I've posted some of my experiences with screenshots. I've found their support is very good, even during the trial period. It is free to try out.

Tom Resing
+1  A: 

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.

Jim
To me it's a curious oversight by the SharePoint team: how many people will set up a structure and never change it?I didn't say that it's single-site only; I said that it only works at a site level. I need to work at a file/folder level - i.e., within a site. Their products may well be able to do so, but I didn't see anything.I've coded something using the object model API. Though it doesn't work 100% correctly, it appears to be close enough to what we want. Needs more testing though! :)
Marc