Please check following code.
Acrobat makes duplicates of the original file with all pages in each new generated files instead of the right extracted pages (example: filename_page_2.pdf must be page 2 of the original pdf).
Another question is that now when the script was running is that at the end of the batch Acrobat asks to save the original file
What am I doing wrong?
/* Extract Pages to Folder */
var re = /.*\/|\.pdf$/ig;
var filename = this.path.replace(re,"");
var lastPage=this.numPages-1;
{
for ( var i = 0; i < this.numPages; i++ )
this.extractPages
({
nStart: 0,
nEnd: lastPage,
cPath : filename + "_page_" + (i+1) + ".pdf"
});
};