views:

583

answers:

2

I'm writing a .Net C# application that will make SOAP calls to a configured SharePoint database, based on certain triggers from another SQL database.

I have a problem where I need to transfer documents from a folder within a list to another folder in a different list. Each document will have version history enabled, which I am required not to lose in the transfer.

SOAP is the best way for me to interact with SharePoint, but if it can be done easily by another method from within my C# environment I'm willing to look into it.

Extra points if someone has a way to move an entire folder and contents from one list to another, without losing document histories etc.

Thanks


Edit:

I've looked into the Copy webservice, and can move files individually between lists that support versioning, but unfortunately the source file's versioning isn't replicated. Code below if anyone's interested

CopyWebReference.Copy copyservice = new CopyWebReference.Copy();
copyservice.Credentials = System.Net.CredentialCache.DefaultCredentials;

CopyWebReference.CopyResult[] results = { new CopyWebReference.CopyResult() };

uint ret = copyservice.CopyIntoItemsLocal(source, new string[] { dest }, out results);

I'm currently looking into using the Sites.ExportWeb and ImportWeb to re-parent an entire folder, I've asked another question about this elsewhere, has anyone had any success with either of these methods?

A: 

http://www.sharepointproducts.com/products/default.aspx has full Web Service API support for Copy and Move. There's also a nice overview of what can be done with WSS, MOSS and the CopyMove-product.

anchorpoint
Good suggestion, but if I can help it I'd rather not complicate the roll-out process to save programming time. I only need to write this app once, whereas roll-out is expected to be at around 50 different sites!Do you know of any other way to do this?
keith
+1  A: 

Have you thought about using WebDAV? Should be a simple operation with the MOVE command

csjohnst