5 Replies Latest reply on Oct 21, 2013 2:01 PM by try67

    Need to remove sixth and remaining characters from a PDF file name


      Typical file name:


      1925a - SomeotherTextHere.pdf


      Need to remove everything after and including the "-" symbol or the sixth position.


      I've tried this but to no avail:


      var filePath = this.path.replace(this.documentFileName,"");

      var newFileName = this.documentFileName.substring(0,6);

      this.saveAs(filePath + newFileName);


      Thanks in advance,