Skip to main content
susanazt
Participating Frequently
September 15, 2025
Answered

Asistente de acciones

  • September 15, 2025
  • 2 replies
  • 467 views

Hola,

Agradecería si alguien me pudiese ayudar: necesito combinar más de 3000 pdf con su correspondiente portada.

La nomenclatura de los ficheros a combinar es:

nombredocumento.pdf

nombredocumentoPortada.pdf

Espero respuesta.

Muchas gracias

Correct answer try67

Are you sure the path is correct, and that the folder exists?

To prevent it from asking you to save the file, add this to the end of the code:

this.dirty = false;


Sorry, silly mistake on my part... Use this:

var newFileName = this.documentFileName.replace(".pdf", "_AV.pdf");
var newFilePath = this.path.replace(this.documentFileName, "AV/");
this.saveAs(newFilePath + newFileName);

2 replies

try67
Community Expert
Community Expert
September 15, 2025

Assuming all the files are located in the same folder, create an Action via Tools - Action Wizard and add to it a command to run a JavaScript with the following code:

 

if (/portada/i.test(this.documentFileName)==false) {
	this.insertPages(-1, this.path.replace(".pdf", "Portada.pdf"));
	this.saveAs(this.path);
}

 

Now run it on your folder, and you're done.

susanazt
susanaztAuthor
Participating Frequently
September 16, 2025

Muchísimas gracias try67, funcionó perfectamente.

susanazt
susanaztAuthor
Participating Frequently
September 16, 2025

Ahora, ya por completar el automatismo sería posible que me guardase los ficheros resultantes en una carpeta nueva y añadiendo al nombre, por ejemplo _AV.

Espero respuestas, pero si no es posible con esto ya avanzaría en el trabajo.

Muchas gracias

Amal.
Legend
September 15, 2025

Hi there 

 

Hope you are doing well and thanks for reaching out. We are sorry for the trouble you are experiencing. 

 

Would you mind sharing more details about the issue you are experiencing, what happens when you try to combine the PDFs Do you get any error message? If yes, please share the screenshot of the same for more clarity. 

 

To know more about how to combine the PDFs and user guided actions please check the help pages listed below:

https://adobe.ly/3K4iRtt 

https://adobe.ly/4nwwjEW 

 

Let us know if you experience any trouble and need more help.

 

~Amal