How do you copy a folder structure from one location to another using CWS... having problems using the copyNode service
Hi Trevor,
Provided that you are moving this within the same environment, and you have a single ParentID that is the root folder to the entire structure you want moved, this is easily achieved via a CopyNode, like so (C#):
cws.CopyOptions Options = new cws.CopyOptions();Options.AddVersion = true;Options.AttrSourceType = cws.AttributeSourceType.DESTINATION;
docCli.CopyNode(ref otAuth, SourceID, DestID, null, Options);
You may need to explicitly declare AttrSourceType if you're doing this in Java, but in C#, it's pretty permissive for what you set for you CopyOptions.
I passed a null in, because I didn't want the name to be changed, too.
Addendum: Just so you know, it looks like Projects that may be within the hierarchy, are skipped.
Just so you, and any other forumgoers, know this, and account for it.