AnsweredAssumed Answered

script

Question asked by edwardlobo on Jul 25, 2012
Latest reply on Jun 25, 2013 by thomasbzh
I am trying to create a script to rename all files in a space. The file extension is filename.bin

I want to rename it to filename.pdf without doing any other process on the file

So far I have tried the following script but without any luck
————–
// 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();
—————-

any help to correct would be appreciated

Outcomes