cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PKdonnajones
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?

1 ACCEPTED SOLUTION

Accepted Solutions
PKdonnajones
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

14 REPLIES 14
UK_Mike
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.

PKdonnajones
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 extract...how 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...

PKdonnajones
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?

This

 

 

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...

PKdonnajones
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

PKdonnajones
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

Oops...

%TextList[134]%

PKdonnajones
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!

PKdonnajones
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?

Capture.JPG

Good to hear...

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Top Solution Authors
Users online (3,665)