Creating an Action Wizard Tool to Batch Replace Page(s)
Hi all,
I wonder if somebody could assist me!
My goal:
I have about 750 pdf files in Folder A (Old) - they are all named 3435.pdf, 3436.pdf, 3437.pdf etc.
I have the same 750 pdf files in Folder B (New) with identical names, they have been updated with new information (these files are all map images).
I dont want to simply overwrite the pdfs in Folder A with Folder B as I will lose all the interactive elements that I have already setup. What I want to do is use the equivalent of the Organize Pages > Replace tool to replace 3435.pdf (Folder A) with 3435.pdf (from Folder B). Which would leave me with updated files in Folder A containing all the new map image from Folder B, but with all the interactive elements still persisting.
From what I understand it is not possible to do this without javascript within the action wizard, however with my little knowledge of javascript I am tripping up trying to create this tool, so far I have come up with the following code, would someone be able to shed any light on wether I am close or a million miles away from my end goal?
// Name of current file
var sFileName = this.documentFileName; // get the file name
// This represents Current Map.pdf
this.replacePages({
nPage: 1,
cPath: "D:\2021_Mapbook\ += sFileName", // I am trying to concatenate the current file name to the new folder path so that it will replace this pdf with the pdf with the latest pdf of the same name
nStart: 1,
nEnd: 1
});
Thanks for any assistance, hopefully this makes some sense!
