I am struggling to write a script in Alfresco to rename file extension.
The file is saved as filename.bin
. I am using content rules to say when filename equals *bin
rename to *pdf
.
I am struggling a bit with the script and would appreciate any help.
My script is as below:
// change the name of this document
document.properties.name = document.properties.name+".pdf";
// add a new property string
document.properties["cm:locale"] = mylocalenode;
// save the property modifications
document.save();
but doesn't seem to get me anywhere.