Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

482

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

Likes

Translate

Translate
Adobe Community Professional ,
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;

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
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").

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

Copy link to clipboard

Copied

Use this:

 

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

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

 

 

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 ,
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.

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 ,
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.

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

Copy link to clipboard

Copied

Yes.

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

Marvelous!

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

It's not doing that for me...

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

Copy link to clipboard

Copied

LATEST

Apologize, yes, it works fine.

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