I have been using a script in a node (folder) to rename all created folders under it, successfully in 5.1.7 see code below:
It did not also work when I did a clean install of 5.1.8 and created the script.
I tried it in a clean install of 5.1.9 and it did not work.
Any help is very much appriciated.
Regards - Govinda
Code: Select all
It did not work when I migrated to 5.1.8.import javax.jcr.*;
import com.openkm.core.*;
import com.openkm.bean.*;
import com.openkm.api.OKMDocument;
String userID = session.getUserID();
String parentDir = com.openkm.util.FileUtils.getParent(eventNode.getPath());
String docName = com.openkm.util.FileUtils.getName(eventNode.getPath());
if (eventType.equals("CREATE_FOLDER")) {
session.move(eventNode.getPath(), parentDir + "/" + userID + " " + docName);
session.save();
}
It did not also work when I did a clean install of 5.1.8 and created the script.
I tried it in a clean install of 5.1.9 and it did not work.
Any help is very much appriciated.
Regards - Govinda