Quantcast
Channel: SCN : Discussion List - SAP Enterprise Portal : Administration and Development
Viewing all articles
Browse latest Browse all 2686

KM API : Moving a file from one folder to other

$
0
0

Hello All,

 

I need to loop over a KM folder, say folder-A, and move files inside to a sub-folder folder-A-1.

I know how to loop over a KM folder using KM API, but dont know how to 'move' the files.

 

Please help.

 

RID folderA_rid = RID.getRID(Folder-A);

IResource folderA_resource = ResourceFactory.getInstance().getResource(folderA_rid, this.resourceContext);

ICollection folderA_Collection = (ICollection) folderA_resource;

IResourceListIterator folderA_Iter = folderA_Collection.getChildren().listIterator();

while (folderA_Iter.hasNext()) {

 

     currentFile= (IResource) folderA_Iter.next();

 

     //Need a piece of code here that moves this currentFile into a subfolder 'folderA1'

     }

 

 

Thanks & Regards,

Amey


Viewing all articles
Browse latest Browse all 2686

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>