Change Filename To Title

New Here ,
Jul 19, 2018 Jul 19, 2018

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?

TOPICS
Edit and convert PDFs

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Jul 19, 2018 Jul 19, 2018
OK, I suggest you read this, then:Adobe Acrobat Pro Action WizardOnce 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!

Likes

Translate

Translate
Adobe Community Professional ,
Jul 19, 2018 Jul 19, 2018

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

That sounds like it would work. How would I go about that?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

Do you have Acrobat Pro? If so, do you know how to use Actions in it?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

I do have Acrobat Pro, vague understanding of Actions however.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 19, 2018 Jul 19, 2018

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 18, 2021 Feb 18, 2021

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 18, 2021 Feb 18, 2021

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, "");

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 19, 2021 Feb 19, 2021

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

Sure:

this.info.Title = this.documentFileName.replace(/\.pdf$/i, "").replace(/-/g, " ");

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

LATEST

Another hearty thanks from me try67, much appreciated. 👍

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines