Merging PDF Documents With Similar File Names

AutoSplit plug-in for Adobe® Acrobat®

Introduction
Use Plug-ins > Merge Documents > Merge Multiple Documents With Similar Filenames menu to merge multiple PDF files from one or more folders into multiple output files. Unlike regular document merging, there are multiple output files from this operation. Each output file is created by taking one input document and finding all other documents that have at least X common first characters in the filename. The similarity between two filenames are computed using the following two methods:
  1. User-Specified Number of First Common Characters
  2. User-Specified Text Pattern
Files that have matching filenames are merged into a single output file and placed into the output folder. Merged files can be named using the matching text or alternatively saved with filename as a first file in the group of files used for merging into the same document.
Example of Using First N Common Characters
This file name comparison method merges files into a single document if they have the same first N-characters. Where N is a user specified number.
For example, if the input consists of the following 10 files, then it can be merged into 4 output documents based on first 10 characters in the filename.
10 files merged based on first 10 characters
Here is a list of 4 output files that will be created:
  1. Account100.pdf that includes 2 files: Account100.pdf, Account100_DataSheet.pdf
  2. Account200.pdf that includes 3 files: Account200.pdf, Account200_DataSheet.pdf, Account200_Index.pdf
  3. Account355.pdf that includes 2 files: Account355.pdf, Account355_DataSheet.pdf
  4. Account987.pdf that includes 3 files: Account987.pdf, Account987_DataSheet.pdf, Account2987_Index.pdf
Example of Using a Text Pattern
Text patterns (regular expressions) can be used to match a specific sequence of characters in the filename and use it to compare files. It can be a certain variable number of characters anywhere in the file name. This method can be used to compare text at the start, end or in the middle of the filename. Files with identical text matching the pattern are merged into a single output PDF file.
For example, if the input consists of the following 10 files, then it can be merged into 3 output PDF documents based on text to the left of the underscore in the filename.
10 files merged based on text to the left of the underscore
Here is a text pattern (regular expression) to use for this case: ^[^_]+
This pattern will match one or more characters that are not an underscore starting from the beginning of the filename.
The following 3 output files will be created:
  1. Edgar Alan Poe.pdf that includes 3 files: Edgar Alan Poe_Summary.pdf, Edgar Alan Poe_DataSheet.pdf, Edgar Alan Poe_Details.pdf
  2. Mark Twain.pdf that includes 3 files:   Mark Twain_Summary.pdf, Mark Twain_DataSheet.pdf, Mark Twaine_Details.pdf
  3. Charles Dickens.pdf that includes 4 files: Charles Dickens_Summary.pdf, Charles Dickense_DataSheet.pdf, Charles Dickens_Details.pdf, Charles Dickens_Attachments.pdf
Regular Expressions
Text patterns provide a very powerful method for merging a wide variety of the files. See the following page for more examples on using this advanced method.
Regular expression (or regex) syntax is used to define text patterns. Regular expressions syntax is used by virtually all text processing applications. Short for regular expression, a regex is a string of text that lets you create patterns that help match, locate, and manage text.
Input File Requirements
IMPORTANT: Please note that input PDF files should not be password protected, digitally signed or restrict user-access rigths.
Prerequisites
You need a copy of Adobe Acrobat Standard/Professional along with AutoSplit™ plug-in installed on your computer in order to use this tutorial. You can download trial versions of both Adobe Acrobat and AutoSplit™.

Step-by-Step Tutorial

Open "Merge Documents With Similar Filenames" Menu
Select "Plug-ins > Merge Documents > Merge Documents With Similar Filenames" from the main menu.
[⚡ How to locate Plugins menu ⚡].
Specify Input Files
Specify an output folder via Browse... button. Merged PDF files will be saved into this folder.
Use Add Folder button to add all files from a specific folder and/or use Add File button to add individual input files for merging.
Specify merging settings
Choose How to Determine Filename Similarity
In this tutorial, we are going to merge PDF files based on first 10 characters in the file names. Files with the same text are going to be merged into a separate document. Enter number of common characters (10) into “Merge files that have at least first common characters” entry box.
Specify how to determine filename similarity
Optional: Specify Output Options
Optionally, press Output Options… button and select desired processing options. You can control bookmarking and various other options.
Specify how to determine filename similarity
Start Merging Process
Click “OK" to start merging process. The list of output files will be displayed at the end of the processing.
List of output files
Review the Report File
The plug-in automatically creates detailed report file in HTML format that shows what files have been used to created output documents.
Check processing report
Merging Files Using Text Patterns
Text patterns provide a very powerful method for merging a wide variety of the files. See the following page for more examples on using this advanced method.
Click here for a list of all step-by-step tutorials available.