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

batch editing of metadata

Guest
Oct 08, 2020 Oct 08, 2020

Copy link to clipboard

Copied

is it possible to use the so-called "tokens" as in some other pdf programs to massively change the title in the metadata? i need to add filename to metadata title in many files.

TOPICS
How to

Views

3.0K

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 , Oct 09, 2020 Oct 09, 2020

I'm not sure what you mean by "tokens", but it is possible to change the metadata of multiple files using an Action in Acrobat Pro, yes. If you want to apply the file's name as its title you can do it using this JavaScript code:

 

this.info.Title = this.documentFileName;

Votes

Translate

Translate
Community Expert ,
Oct 09, 2020 Oct 09, 2020

Copy link to clipboard

Copied

I'm not sure what you mean by "tokens", but it is possible to change the metadata of multiple files using an Action in Acrobat Pro, yes. If you want to apply the file's name as its title you can do it using this JavaScript code:

 

this.info.Title = this.documentFileName;

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
Guest
Oct 11, 2020 Oct 11, 2020

Copy link to clipboard

Copied

Thanks for the answer, maybe you can help me? I need the title in metadata consisted of "some text"
+ file name (if possible without ".pdf").

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 ,
Oct 11, 2020 Oct 11, 2020

Copy link to clipboard

Copied

Use this:

 

this.info.Title = "some text " + this.documentFileName.replace(".pdf", "");

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 ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

Hello, Cool answer. It's exactly what I needed, adding file name to file info title. I tested, and it works. Thanks.

 

Elsewhere, what script could I use to fill the "Author", "Keywords", and "Subject" fields?

 

Cheers,

 

 

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 ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

It's the same, just replace info.Title with info.Author, info.Keywords, etc.

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 ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

Simple solution... Great! Can I do the following?

 

this.info.Title = "some text ";

 

Thanks.

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 ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

Yes.

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

Hello, How can I write so the JavaScript excludes the suffix .PDF?

 

this.info.Title = this.documentFileName;

 

Thanks,

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

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
New Here ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

Thanks a million for your reply,

 

As is, your script doesn't exclude .pdf.

 

Cheers,

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

Sorry, it had a typo... Try it now.

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

Marvelous!

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

With this:

 

this.info.Title = "some text ";

 

I get "some text". How can I exclude the quotes?

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

I get "some text" with the quotes in the Title field.

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

It's not doing that for me...

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 02, 2021 Jul 02, 2021

Copy link to clipboard

Copied

Apologize, yes, it works fine.

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

Copy link to clipboard

Copied

Hi, With Adobe Acrobat 2020, I wish to do the same as described in this tread.

 

With the script below, it's not working. Can we modify the script or does it only work with Adobe Acrobat Pro?

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

Copy link to clipboard

Copied

LATEST

There's no reason the code above shouldn't work in your version, but only the Pro version of Acrobat has batch processing capabilities (via the Action Wizard). So you can use it, but only on one file at a time.

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