Required library edition:
Required library file: dhtmlxfolders.js
Applies function func to each selected item. Function gets slected item object and index as incoming parameters.
function updateId(item,index){ item.setId(item.data.id+"_new") } myFolders.forEachSelected(updateId);