cancel
Showing results for 
Search instead for 
Did you mean: 

Copy only content and not space

flip
Champ in-the-making
Champ in-the-making
Hi,

I've next structure:

Folder1
   |- file1
   |- file2
Folder2

I want copy file1 and file 2 to Folder2. I'have this source

         CMLCopy copy = new CMLCopy();
           copy.setTo(new ParentReference(STORE, "5fb05a96-587f-4c86-8a89-8be7d383de22", null,
                 Constants.ASSOC_CONTAINS, "Folder2"));
           copy.setWhere(new Predicate(new Reference[]{new Reference(STORE, "b16b712a-2e94-4edf-abfc-1bd71e92a9ae", null)}, STORE, null));
           copy.setChildren(true);
           CML cml = new CML();
           cml.setCopy(new CMLCopy[]{copy});
           WebServiceFactory.getRepositoryService().update(cml);


(I have the node's ids)

Ok, copy right, but the with this result:

Folder1
   |- file1
   |- file2
Folder2
   |- Folder2
         |- file1
         |- file2

How can i copy ONLY the files, withour create into the destination folder? (without create another folder)

Thanks!
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
Could you please share with us all the snippet?