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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard