Other PDF Issues

How to Batch Rename PDF Files Using Document Titles

Emma BrownEmma Brown Oct 28, 2026 869 views

Question details

The user needs to automatically rename a large batch of PDF files based on the 'Title' stored within each document's metadata.

How to Batch Rename PDF Files Using Document Titles
Product
Adobe Acrobat Pro
Device & OS
not provided
Scenario
Organizing thousands of generic or improperly named PDF files by automatically applying their internal metadata titles as the new file names.
Observed behavior
Currently, files have generic names, and manually renaming them is impractical. The goal is to extract the metadata title and use it to rename the files automatically.
Before you start

Always create a backup copy of your original PDF files before running any batch processing scripts, as missing metadata or invalid characters in document titles can cause errors during the renaming process.

Solution 1Recommended

Use Action Wizard and JavaScript in Adobe Acrobat Pro

Utilize the Action Wizard to run a custom JavaScript snippet that saves a copy of each PDF using its metadata title.

Adobe Acrobat Pro allows you to automate repetitive tasks across multiple files using the Action Wizard. By adding a simple JavaScript command to an Action, you can instruct the program to extract the 'Title' property from the document's metadata and use it to save a new file.

Note that due to file-handling restrictions, Acrobat cannot directly rename the original files in place. Instead, this method processes the batch and outputs newly named copies into your designated folder.

1
Open the Action Wizard

Launch Adobe Acrobat Pro, go to the 'Tools' tab, and select 'Action Wizard' from the list of available tools.

2
Create a New Action

Click on 'New Action' in the toolbar. Under the 'Files to be Processed' section on the right, click 'Add Folder' and select the directory containing the PDFs you want to rename.

3
Add a JavaScript Task

In the left pane under 'Choose tools to add', expand 'More Tools', select 'Execute JavaScript', and click the '+' icon to add it to your Action steps.

4
Insert the Renaming Code

Click the gear icon (Specify Settings) next to the 'Execute JavaScript' step you just added. Paste the following code into the window: this.saveAs(this.path.replace(this.documentFileName, this.info.Title + ".pdf")); Then click 'OK'.

5
Save and Execute

Click 'Save', name your Action (e.g., 'Batch Rename by Title'), and confirm. Finally, click on your newly created Action in the Action List and hit 'Start' to process the files.

Use Action Wizard and JavaScript in Adobe Acrobat Pro
Sanitize Invalid Characters: Ensure your document metadata titles do not contain characters prohibited in file names (such as /, \, :, *, ?, ", <, >, |). If a title contains these, the script will fail to save that specific file.
Free Microsoft Office alternative

Easily Manage PDF Documents with WPS Office

While complex batch scripting requires advanced software like Acrobat Pro, WPS Office provides a lightweight, highly compatible, and user-friendly PDF editor. You can easily read, edit, and modify PDF metadata properties without an expensive subscription.

Free, lightweight, and fast PDF reader and editorFully compatible with Adobe PDF and Microsoft Office formats (Word, Excel, PowerPoint)Easily view and modify document properties and metadata titlesFamiliar tabbed interface for seamless document management
QA img-9

Frequently Asked Questions

Why did the batch rename script fail on some of my PDFs?

The script typically fails if the PDF's internal metadata 'Title' is entirely blank, or if the title contains invalid filename characters like colons (:), slashes (/), or question marks (?).

Can I rename the original files instead of saving copies?

In Adobe Acrobat Pro, security and file-handling restrictions prevent JavaScript from directly renaming the active file while it is open. The 'saveAs' method safely creates correctly named copies instead.

How do I check or edit a PDF's document title metadata?

You can view or edit the document title by opening the PDF, navigating to File > Properties (or Document Properties), and looking under the Description tab for the 'Title' field.

Are there dedicated utility programs for batch renaming by PDF metadata?

Yes. If you prefer not to use JavaScript, there are third-party bulk file renaming utilities that can extract PDF metadata titles and directly rename the original files in your operating system without opening them in a PDF viewer.