PDF Conversion Issues

How to Batch Combine Files in Subfolders and Rename PDFs Automatically

Jason MillerJason Miller Oct 28, 2026 868 views

Question details

The user needs a way to automatically combine multiple files located within various subfolders into single PDF files, naming each resulting PDF after its parent folder to avoid manual processing.

Batch Combine Files in Subfolders and Auto-Rename PDFs
Product
Adobe Acrobat / PDF Editors
Device & OS
not provided
Scenario
Managing large numbers of documents organized by folder that need to be compiled into single, neatly named PDF archives.
Observed behavior
Native PDF merging tools often require users to manually select files for each folder and type the output name manually, which is highly inefficient for bulk processing.
Before you start

Ensure all files within your subfolders are in supported formats (like DOCX, JPG, or PDF) before attempting a batch combine, and temporarily back up your original folders to prevent accidental data loss during automated processing.

Solution 1Recommended

Use Adobe Acrobat Action Wizard with Custom JavaScript

For advanced users, writing a custom JavaScript within Adobe Acrobat's Action Wizard allows you to loop through folders, merge files, and save them dynamically using the parent folder's name.

Adobe Acrobat Pro includes an Action Wizard that can automate repetitive tasks across multiple files. However, because native tools do not dynamically grab folder names for saving, you must incorporate a custom JavaScript script into your Action sequence to achieve auto-renaming.

1
Access the Action Wizard

Open Adobe Acrobat Pro, click on the 'Tools' tab, and scroll down to select 'Action Wizard'.

2
Create a New Batch Action

Click 'New Action' in the toolbar to create a custom batch process. Under 'Files to be Processed', click 'Add Folder' and select your root directory containing the subfolders.

3
Add a JavaScript Command

From the 'More Tools' section on the left panel, select 'Execute JavaScript' and add it to your action steps on the right.

4
Enter the Custom Script

Click 'Specify Settings' on the JavaScript step and enter your custom script designed to parse the file path, extract the parent folder's name, and execute the saveAs() function. Save the action.

5
Run the Action

Click on your newly created Action in the Action Wizard list and click 'Start' to process your subfolders.

Use Adobe Acrobat Action Wizard with Custom JavaScript
JavaScript Knowledge Required: Writing custom Adobe JavaScript requires programming knowledge. If you are unfamiliar with JS, you may need to purchase pre-written scripts from reputable third-party Adobe automation developers.

Quickly Combine PDF Files with WPS Office

While complex automated subfolder scripting requires standalone programming tools, WPS Office provides a highly intuitive and fast PDF merger for standard batch combining tasks. You can easily add multiple files from your folders, arrange their order, and export them as a single PDF in seconds.

  1. 1. Access the PDF Merge Tool: Open WPS Office, navigate to the 'Tools' tab, and click on 'Merge PDF' to open the processing window.
  2. 2. Add Your Files: Click the 'Add Files' button to browse your folders and select the documents or images you wish to combine into a single PDF.
  3. 3. Arrange the Sequence: Drag and drop the imported files within the interface to adjust their page order exactly how you want them to appear.
  4. 4. Merge and Save: Specify your desired output name and save location at the bottom, then click 'Merge' to generate your combined PDF document.
Easily combine multiple files and image formats into a single PDF document.Highly compatible with Microsoft Office formats (Word, Excel, PowerPoint) and Adobe PDF standards.Lightweight software with an intuitive, user-friendly interface for document management.Built-in tools for editing, splitting, and compressing PDFs after merging.
microsoft office alternative - wps office

Frequently Asked Questions

Can I batch combine files of different formats (e.g., Word and JPG) into a PDF?

Yes, most professional PDF editors, including WPS Office and Adobe Acrobat, allow you to select various file types and will automatically convert them to PDF format before merging them together.

Why doesn't Adobe Acrobat automatically name merged files after the parent folder by default?

Native Acrobat merging tools intentionally prompt for a manual save location and file name to ensure the user retains complete control over the output. Dynamic naming based on folder structures requires custom JavaScript or specialized Action Wizard configurations.

Is there a free way to batch combine folders into PDFs?

While basic manual PDF merging is free in many tools like WPS Office, fully automating subfolder loops with dynamic file renaming typically requires premium software features (like Acrobat Pro's Action Wizard) or specialized paid batch utility scripts.

Will merging multiple files reduce the quality of the original documents?

No, combining files into a PDF simply appends the pages together without degrading quality. However, if your merging tool has built-in optimization or compression settings enabled by default, it might compress images to save space. Always check your export settings before merging.