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?
You can use an Action in Acrobat Pro to save a copy of the files using their Title property, but not rename them.
That sounds like it would work. How would I go about that?
Do you have Acrobat Pro? If so, do you know how to use Actions in it?
I do have Acrobat Pro, vague understanding of Actions however.
OK, I suggest you read this, then:
this.saveAs(this.path.replace(this.documentFileName, this.info.Title + ".pdf"));
Then run it on your files, and you're done!
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).
Any help appreciated. Acrobat Pro DC, btw.
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, "");
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.
this.info.Title = this.documentFileName.replace(/\.pdf$/i, "").replace(/-/g, " ");
Another hearty thanks from me try67, much appreciated. 👍