AnsweredAssumed Answered

Copy only content and not space

Question asked by flip on Dec 21, 2011
Latest reply on Jan 27, 2012 by openpj
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!

Outcomes