We help IT Professionals succeed at work.
Get Started

Merge PDFs together based on their filename

Gary Mellor
Gary Mellor asked
on
1,342 Views
Last Modified: 2015-04-12
Hello,

Does anybody know a way (perhaps using JavaScript) to merge PDFs together based on their filename?

I have created several PDF files (extracting from a large file) with student timetable on it and named the files with their student ID and page number (some are 2 pages and some are only one page):

012345 - page1.pdf
012345 - page2.pdf
011112 - page1.pdf
022223 - page1.pdf
022223 - page2.pdf

I need to merge the files together based on the filename, i.e.

012345 - page1.pdf
012345 - page2.pdf

MERGED into a single file (based on the first 6 characters of the filename).

There is over a 1000 files therefore would take a long time to do manually.

Any ideas (I am sure this can be done using the JavaScript Console however I am not sure how). I have the latest copy of Adobe Acrobat.

Thanks,
Gary
Comment
Watch Question
Developer
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE