cancel
Showing results for 
Search instead for 
Did you mean: 

moving nodes

enkidu
Champ in-the-making
Champ in-the-making
hi mates,

how do i move, copy nodes from one folder to another with java.. any ideas.. xpath search didnt work with new created folders. HELPPPP!!!!
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Move and Copy are separate operations.    Copy leaves the existing node in place and creates a new node.   Move will move the node preserving the NodeRef in particular.

In Java look at the FileFolderService which has copy and move methods.   I think they are also available on the Java Script API.

A final couple of considerations are that sometimes you don't want to copy and move everything, so there are various policies you can use to control which properties and aspects are copied and copy also has an option to retain information of the source node.

enkidu
Champ in-the-making
Champ in-the-making
thnx mate..