Highlighted

Batch insert values to Subject and Keywords of pdf file description from the File Name

Community Beginner ,
Sep 21, 2020

Copy link to clipboard

Copied

My task is to insert metadata in batch of pdf files: Title, Author, Subject and Keywords.

While Title and Author are the same for all files, I created Action - Add File Description, and processed batch quite easily and efficiently.

I can't do the same for Subject and Keywords, since these values are unique to each document. Both pieces of information are part of the File Name, for example:

PDF File Name is A_B_C.pdf 

A needs to be in the Subject line

B needs to be in Keywords line 

Is there a way to automate the process for batch of files, and insert desired information into each file description? I'll appreciate any helpful comments. Thank you.

TOPICS
Comment review and collaborate PDF, Create PDFs, Edit and convert PDFs, General troubleshooting, Standards and accessibility

Views

58

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

Batch insert values to Subject and Keywords of pdf file description from the File Name

Community Beginner ,
Sep 21, 2020

Copy link to clipboard

Copied

My task is to insert metadata in batch of pdf files: Title, Author, Subject and Keywords.

While Title and Author are the same for all files, I created Action - Add File Description, and processed batch quite easily and efficiently.

I can't do the same for Subject and Keywords, since these values are unique to each document. Both pieces of information are part of the File Name, for example:

PDF File Name is A_B_C.pdf 

A needs to be in the Subject line

B needs to be in Keywords line 

Is there a way to automate the process for batch of files, and insert desired information into each file description? I'll appreciate any helpful comments. Thank you.

TOPICS
Comment review and collaborate PDF, Create PDFs, Edit and convert PDFs, General troubleshooting, Standards and accessibility

Views

59

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
Sep 21, 2020 1
Most Valuable Participant ,
Sep 22, 2020

Copy link to clipboard

Copied

Yes, you can do it using a script, like this:

this.info.Subject = this.documentFileName.split("_")[0];

this.info.Keywords = this.documentFileName.split("_")[1];

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
Reply
Loading...
Sep 22, 2020 0
Community Beginner ,
Sep 22, 2020

Copy link to clipboard

Copied

try67 - Thank you very much for your help!

I've never used scripts before (in Adobe at least) but digged in , and was able to apply what's needed and execute it.

The result was exactly as expected.

I hope you have a great day!!

 

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
Reply
Loading...
Sep 22, 2020 0