cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
christina_hoeg
Level: Powered On

Rename a file on sharepoint

I have the following problem:

I have a list on sharepoint (called ListA) with the following data in it:

Procedure Number

Product

Filename

Filename created

123456

Testproduct

123456_theFilename.pdf

Yes

458725

Testproduct2

458725_theFilename.pdf

No

 

And I also have a sharepoint library with different files in it that are all named like this:

123456.pdf

458725.pdf

 

Now I want to create a flow that changes the name from 123456.pdf to 123456_theFilename.pd once the Yes/No column in the list is changed from No to Yes. Now I think I know how to trigger the flow. I used the following:

Capture_1.JPG

Now hoe do I do the rest?

I searched various tips and forums and I figured at the moment there is no 'elegant' way to change a file name.

You have to create a new file and delete the old one as I understand it.

But how do I make sure that I change only the file with the name corresponding to the procedure number?

I tried the following but it didn't seem to work.

Capture_2.JPG

 

Also I am having trouble with changing the file name...

 

Can anyone help me with this?

 

Thanks in advance! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Rename a file on sharepoint

Hi @christina_hoeg ,

 

Please refer to screenshot below to create the flow:

1.png2.png

 

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Rename a file on sharepoint

Hi @christina_hoeg ,

 

After your trigger check the flag is Yes. If yes then create a new file, delete the old file.  You can get the old file name from your new filename format (123456_theFilename.pdf) by using a split function. 

 

If you need any further help in this please let me know.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Community Support Team
Community Support Team

Re: Rename a file on sharepoint

Hi @christina_hoeg ,

 

Please refer to screenshot below to create the flow:

1.png2.png

 

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Highlighted
christina_hoeg
Level: Powered On

Re: Rename a file on sharepoint

That you! That works really well 🙂

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,021)