Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Renaming Multiple PDF files based

I am brand new to POWER AUTOMATE and excited to give it a try!


I have a folder of PDF files and they all have a system name, I want to rename all 167 pdf files based on the Name field inside the pdf.  Do I have to open the PDF, copy the name and then save as or is there an easier process to rename multiple files?  I did create an AI form processor that identifies the name I need from the PDF file, how can I implement that?


Accepted Solutions
Frequent Visitor

Thanks.  You patience is greatly appreciated.  I have the automation I needed.  Once I set the variable and added Rename File, it works perfectly!

View solution in original post

Post Prodigy
Post Prodigy

No you dont have to open each file.

Just extract the text from the pdf, look at the output, if the name field is always in the same position, easy peasy, if not I would recommend regex.

Frequent Visitor

Thanks for your response.  Yes the name is always in the same location.  When I add extract Text from PDF, I do not see where it asks me what to does it know what field I need from the PDF?  how do I look at the output?

This is what I have so farCapture.JPG

Its in the %extractedpdftext% on the variable pane to the right, double click to view output...

Frequent Visitor

Okay.. I need more help than that.  I need it to extract just a certain field (Name) and use that to rename the PDF file.  As I said, I am BRAND new and this is too simplistic of an answer.  Can you recommend a tutorial that may be able to help?




Screenshot 2022-03-04 200150.png

Ps... If you have the same name twice, you cant have 2 exact filenames in the same folder, will need an invoice number or something else to distinguish...

Frequent Visitor

I am not pulling information from invoices... Thanks for the information, but I will continue searching for online help... I don't understand 

You quite clearly said the info you required was inside the pdf ?

I and everyone else are here to help...

My output from double clicking on the variable I told you about earlier...


Screenshot 2022-03-04 201426.png

Frequent Visitor

Yes, I appreciate your patience.  So from the extracted PDF Text I need information that is on line 134 and that is the data I need to rename the file.   How do I pull that name on line 134 into a variable and use it to rename my file?

Split %ExtractedPDFText% like below, the output will be %TextList% , the info you require will be on the line stated within this variable.



Screenshot 2022-03-04 203109.png



Frequent Visitor

Thanks.  You patience is greatly appreciated.  I have the automation I needed.  Once I set the variable and added Rename File, it works perfectly!

Frequent Visitor

I amy trying this automation again with a different type of pdf... they are all still the same and i do not get an error but it is not renaming my files.  What am I doing wrong?


Good to hear...

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Solution Authors
Top Kudoed Authors
Users online (5,828)