I have this code to append two sets of reports CIS(A115A)_x.pdf and CIS(A116A)_x.pdf into one pdf document. It's supposed to append the cPath into the sPath and it's not doing anything at all.
var j=1;
try {
while (j < 13)
{
var sPath="C:/Books/CIS(A116A)_" + j + ".pdf";
var re = /.*\/|\.pdf$/ig;
var re1= /(A116A)/ig;
var filename = sPath.path.replace(re,""
;
var filename = sPath.path.replace(re1,"(A115A)"
;
sPath.insertPages({
nPage: -1,
cPath: "C:/Books/"+filename+"_"+j+".pdf",
nStart: 0,
nEnd: 2
})
i++;
}
}
catch (e) {
console.println("Aborted: "+e)
}
ny help will be greatly appreciated.
var j=1;
try {
while (j < 13)
{
var sPath="C:/Books/CIS(A116A)_" + j + ".pdf";
var re = /.*\/|\.pdf$/ig;
var re1= /(A116A)/ig;
var filename = sPath.path.replace(re,""
var filename = sPath.path.replace(re1,"(A115A)"
sPath.insertPages({
nPage: -1,
cPath: "C:/Books/"+filename+"_"+j+".pdf",
nStart: 0,
nEnd: 2
})
i++;
}
}
catch (e) {
console.println("Aborted: "+e)
}
ny help will be greatly appreciated.