How to combine PDF pages into one in a specific order?

I have 5 PDF files with names Page1.pdf, Page2.pdf, Page3.pdf, Page4.pdf, Page5.pdf.
I need to join all these PDF files into a single PDF named ABC.pdf in the same order.
While I try joining, the pages are coming in different ordres. How can I join the files in the specific order.

Hey @Siva_Priya,
using the “Join PDF Files” Activity from UiPath.PDF.Activities Package, requires an input Array, of the file Paths. The joined files are always in the order of the file paths in the array, so to sort them you would just need to sort the array correctly.
Here’s an example of:
MergePDF.xaml (5.5 KB)
(this example requires a Documents folder in your project folder with files Page1.pdf, Page2.pdf and Page3.pdf in it)
And here’s the link to the documentation: