Advise how can. merge similar name pdf merge

I have PDF Files under root folder in sub folders with diffrent (Dynamic) names and I want to merge the PDF file based on matching case as below.

Input date is like this

Root folder : Cnames
Sub folder: A

PDF FIles in A



Sub folder: B

PDF FIles in B


Ouput Requirment Combine PDFs as this:

Create a new root folder as Cnames_Today date

Create Sub folder: A

Merge: BL123_INV1 + BL123 as 1file
Sequence of pages : BL123_INV1 should be 1st page.
Output File name should be = BL123_INV1

Merge: ZBL124_INV2 + ZBL124 as 1file
Sequence of pages : ZBL124_INV2 should be 1st page.
Output File name should be = ZBL124_INV2

CreatSub folder: B

Merge: CBL124_INV3 + CBL124 as 1 file and
CBL124_INV4 + CBL124 as another 1 file

Sequence of pages : Same as in sub folder A
Output File name should be =
1st file CBL124_INV3
2nd file CBL124_INV4


@VB_Tech_pro Can you also please give an example of what should be the expected output if there are 4 or more pdf’s in the same folder, Also Will the first Prefix in the Pdf files be present as a separate PDF file always in your Scenario ? (CBL124.pdf where CBL124 is a prefix for the other pdf’s in the same folder)

1 Like

Hi Thanks for reply @supermanPunch
Yes correct if 4th or more file is avilable it should be merge with CBL124(with first prifix) as new file with name as 4th file name.

Merge steps added output name shown
In merged file 1st page will be JEDBL_INV1***


@VB_Tech_pro Can you check the below workflow :
Merge PDF (1.3 MB)

Check the ‘Cnames’ folder and it’s respective pdf’s (example pdf’s). Execute the Workflow. The Output will be generated in the required format.

However we have assumed that there will be always a file in the folder that has the Prefix itself as the filename.

Test the workflow with all the inputs possible and let us know if it does not satisfy any of the test cases and please explain the test data that you have used.

1 Like

Hi Thanks a lot Arpan @supermanPunch it is working exact as per my requirement yes you are really Superman…

1 Like