cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

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
Highlighted
Community Support
Community Support

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
Highlighted
Super User III
Super User III

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!

Learn more from my blog
Highlighted
Community Support
Community Support

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
Advocate I
Advocate I

Re: Rename a file on sharepoint

That you! That works really well 🙂

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (3,407)