cancel
Showing results for 
Search instead for 
Did you mean: 

Move document

litllel
Champ in-the-making
Champ in-the-making
Hi guys, how can I select a document path and move this document to an other document path by java code.
thks
2 REPLIES 2

steven_okennedy
Star Contributor
Star Contributor
Use the FileFolderService.move(sourceNode, targetParent, targetfilename) method.  First find get the NodeRefs of the document you wish to move and the folder you wish to move it to (you can use FileFolderService.resolveNamePath(root, path) to resolve a path String into the nodeRef that that path represents, just use String.split("/") to change your path into a List of path elements and work from a common root node like the Company Home)

Regards

Steven

litllel
Champ in-the-making
Champ in-the-making
I have done it in an other way
Welcome to the new Hyland Connect. Get started or submit feedback.