• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

5.3K

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

Community Expert , Jul 19, 2018 Jul 19, 2018

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!

Votes

Translate

Translate
Community Expert ,
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.

Votes

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?

Votes

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 Expert ,
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?

Votes

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.

Votes

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 Expert ,
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!

Votes

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.

Votes

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

Votes

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.

Votes

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 Expert ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

Sure:

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

Votes

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

Another hearty thanks from me try67, much appreciated. 👍

Votes

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
Explorer ,
Jul 30, 2021 Jul 30, 2021

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

Votes

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 ,
Nov 14, 2021 Nov 14, 2021

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.

 

Votes

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 Expert ,
Nov 15, 2021 Nov 15, 2021

Copy link to clipboard

Copied

Are you trying to rename the file using the Title info, then?

Votes

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 ,
Sep 19, 2023 Sep 19, 2023

Copy link to clipboard

Copied

LATEST

This has definitely save my day! Thanks a lot!

Votes

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