PDF Mearging in studio x


I have multiple pdf files in each sub folders.

Is that possible to merge and save in same path.

Any idea :bulb:.


Can you try Join PDF File activity as the following?


  1. Install UiPath.PDF.Activities Package from Official feed.

  1. Then put Join PDF File activity. FileList is System.IO.Directory.GetFiles("c:\temp","*.pdf",searchOption.AllDirectories) , for example.


Thanks you.

It’s working now.

It’s merging all the pdf in sub folders.

I need merging files separately based on sub folders.


Can you try as the following?


1 Like


In that case use the below steps if you want to process the files only in sub folders

  1. Use a assign activity like this

arr1 = Directory.GetFiles(“your folderpath”, “*.pdf”)

Where arr1 is a array of string variable

  1. Another assign activity like this

arr2 = Directory.GetFiles(“your folderpath”, “*.pdf”, SearchOption.AllDirectories)

Where arr2 is a array of string variable

  1. Now use a final assign activity like this

Final_arr = arr2.Except(arr1).ToArray()

This will give the pdf only inside the sub folders

Where Final_arr is a array of string variable

Cheers @rak95561

1 Like

Using studio X how to merge pdf files at time in multiple sub folders

Pls help on this.

1 Like

I would like to suggest avoid creating multiple topics on same note
Pls use this topic to discuss further

Have a great day @rak95561

It’s worked thanks


I’m getting error when try to join pdf files
Please see the below screnshot.
I need to mearge all the pdfs in current folder.


Try using below expression. Thanks.


1 Like

Thank you it’s working bu need to save the results in same path.
Is that possible