Copy link to clipboard
Copied
I've got around 4500 files that all need to be renamed to what's already been typed as the document title. Is there any way to achieve this with batch processing?
OK, I suggest you read this, then:
Adobe Acrobat Pro Action Wizard
Once you did, create a new Action and set it to execute this JavaScript code:
this.saveAs(this.path.replace(this.documentFileName, this.info.Title + ".pdf"));
Then run it on your files, and you're done!
Copy link to clipboard
Copied
You can use an Action in Acrobat Pro to save a copy of the files using their Title property, but not rename them.
Copy link to clipboard
Copied
That sounds like it would work. How would I go about that?
Copy link to clipboard
Copied
Do you have Acrobat Pro? If so, do you know how to use Actions in it?
Copy link to clipboard
Copied
I do have Acrobat Pro, vague understanding of Actions however.
Copy link to clipboard
Copied
OK, I suggest you read this, then:
Adobe Acrobat Pro Action Wizard
Once you did, create a new Action and set it to execute this JavaScript code:
this.saveAs(this.path.replace(this.documentFileName, this.info.Title + ".pdf"));
Then run it on your files, and you're done!
Copy link to clipboard
Copied
I need to do the exact opposite to the OP - write the filename to the document title. I tried reversing the example given but it does nothing (I'm not a JS guy).
this.saveAs(this.path.replace(this.info.Title, this.documentFileName));
Any help appreciated. Acrobat Pro DC, btw.
Copy link to clipboard
Copied
Yeah, no, that's not going to work... Try this:
this.info.Title = this.documentFileName;
If you want it without the ".pdf" extension use this:
this.info.Title = this.documentFileName.replace(/\.pdf$/i, "");
Copy link to clipboard
Copied
Well that is just fine and dandy - thank you so much try67! I don't suppose you can furnish me with the regex to then replace the hyphens with spaces could you? If not, you've already helped a great deal.
Newsletter-Spring-2019-Final.pdf (filename) > Newsletter Spring 2019 Final (title)
Again, you have my gratitude.
Copy link to clipboard
Copied
Sure:
this.info.Title = this.documentFileName.replace(/\.pdf$/i, "").replace(/-/g, " ");
Copy link to clipboard
Copied
Another hearty thanks from me try67, much appreciated. 👍
Copy link to clipboard
Copied
Thank you. Superbly useful. All the better as it is rare to find much accurate help for adobe products.
xsd
Copy link to clipboard
Copied
Hi, I need to change document title to follow filenames as well for a batch of PDF. I've followed the steps but nothing happens.
In ActionWizard instruction, I've input as below. Is this correct?
this.saveAs(this.path.replace(this.info.Title= this.documentFileName));
P/S - I am not familiar w coding.
Copy link to clipboard
Copied
Are you trying to rename the file using the Title info, then?
Copy link to clipboard
Copied
This has definitely save my day! Thanks a lot!