How to Batch-Set PDF Metadata Titles from File Names in Adobe Acrobat
Question details
The user needs a method to batch-update the metadata titles of multiple PDF documents so that each PDF's title matches its file name.

- Product
- Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- Organizing and standardizing metadata for a large collection of PDF files automatically.
- Observed behavior
- The user wants to use a script or token to map file names to metadata titles, but standard Acrobat 2020 JavaScript attempts are not working without Pro features.
Before running any batch scripts, make sure to create a backup folder of your PDF files to prevent accidental data loss in case the batch sequence modifies files incorrectly.
Use Acrobat Pro Action Wizard with JavaScript
Utilize the Action Wizard feature in Adobe Acrobat Pro to run a custom JavaScript that extracts the file name and applies it to the document's metadata title.
Standard Adobe Reader and Acrobat Standard do not support batch actions or metadata modifications. You must use Adobe Acrobat Pro to create and execute this batch script.
The script automatically reads the current document's file name and assigns it to the Title field in the PDF metadata.
Launch Adobe Acrobat Pro, navigate to the 'Tools' tab, and select 'Action Wizard'.
Click 'New Action' in the toolbar to create a custom batch process sequence.
Under 'Choose tools to add', expand the 'More Tools' section, select 'Execute JavaScript', and click the '+' button to add it to your action steps.
Uncheck the 'Prompt user' box, click 'Specify Settings', and paste the following code: this.info.Title = this.documentFileName;
Add a 'Save' step from the 'Save & Export' category to ensure files are saved automatically. Save the Action, then run it on your desired folder of PDFs.

Manage and Edit Documents Seamlessly with WPS Office
While automated batch scripting for PDF metadata requires specialized premium software like Adobe Acrobat Pro, you can rely on WPS Office for all your everyday PDF editing and document management needs. It offers a lightweight, fully compatible, and cost-effective solution for handling office files.
- 1. Download and Install: Visit the official WPS Office website to download and install the free software on your Windows, Mac, or mobile device.
- 2. Open Your PDF: Launch WPS Office, click on 'Open', and select the PDF file you wish to view or edit.
- 3. Edit and Convert: Use the built-in PDF tools to edit text, merge files, or convert the document to Word, Excel, or PowerPoint formats effortlessly.

Frequently Asked Questions
Why is my JavaScript not working in Adobe Acrobat 2020?
Standard versions of Adobe Acrobat 2020 do not support batch processing or advanced Action Wizard scripts. You need Adobe Acrobat Pro to run batch JavaScript actions that modify metadata.
Can I batch change PDF titles using standard Adobe Reader?
No, Adobe Reader is a free viewer and lacks the functionality to run Action Wizards or edit PDF metadata. Modifying document properties requires a premium PDF editor like Acrobat Pro.
How can I check if the metadata title has been successfully updated?
Open the modified PDF in your PDF viewer, go to 'File' > 'Properties' (or press Ctrl+D / Cmd+D), and check the 'Title' field under the Description tab. It should now match your file name.
Will changing the metadata title rename my original PDF file?
No, the file name and the metadata title are separate properties. The JavaScript copies the current file name and inserts it into the document's internal metadata without renaming the file on your hard drive.




