web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Merge files based on t...
Power Automate
Answered

Merge files based on the file names by using PAD

(0) ShareShare
ReportReport
Posted on by 34

Hi, I am new to PAD. I am trying to merge the pdf files based on the invoice names using PAD. i am able to split the gaint pdf file based on the invoice name by using Extract PDF file pages to new pdf file action. i would like to merge the pdf files if it has the same invoice names with suffix.

Eg:

abc.pdf

abc1.pdf

abc2.pdf

abc3.pdf

xyz.pdf

xyz1.pdf

sample.pdf

sample1.pdf

I need to merge the above files based on the invoice file names like

abc.pdf

xyz.pdf

sample.pdf

we cant predict the filenames, it is based on the pdf file invoice name. please guide me how to achieve merge these files dynamically by using PAD.

Thanks in Advance!

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you have the invoice names somewhere, the best approach would be to use a For each loop on the invoice names to iterate through them. This will give you a single invoice name per iteration of the loop, stored in %CurrentItem%. Then use Get files in folder with %CurrentItem%*.pdf  as the file filter. This will return all files that contain the invoice name in the file name. Finally, use Merge PDF files on the resulting list of files.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard