I was wondering if someone could point out how to rename a file name.
 
In the script I am using I see
 
function fileFromPath(file){  
  return file.replace(/.*(\/|\\)/, "");
}
 
which replaces characters.... but how would I completely rename the file
 
I tried:
 
function fileFromPath(file){
 
     var dateObject = new Date();
     var file =
          dateObject.getFullYear() + '' +
          dateObject.getMonth() + '' +
         dateObject.getDate() + '' +
          dateObject.getTime();

     return file("");
  
  //return file.replace(/.*(\/|\\)/, "");
  
} but i lose the extension of the file
 
Dave 

Reply via email to