Assuming that InputFile is the path to the book, you can use this:
SavePdf(FileSource,InputFile.replace(/\.book$/i,"") + OutPutFiles[output_no]);
I haven't tested it, but it should work. It replaces the .book extension with an empty string.
That seems to do the trick, thanks. Where is the .replace syntax documented?
1 person found this helpful