Skip to main content
Community site session details

Community site session details

Session Id : 6WPNUuSdFcg6Gtukn9wbJp
Power Automate - General Discussion
Answered

Renaming SharePoint file using REST API with Power Automate cuts off everything when it sees a period

Like (0) ShareShare
ReportReport
Posted on 10 Mar 2021 02:34:47 by 11,059 Moderator

Within Power Automate, I'm using the SharePoint REST API action (Send an HTTP request to SharePoint) to rename a SharePoint file.

It all works perfectly, except for when I want to include a period as part of the name.

Example: I have a file named Test.docx and I want to concatenate the version number to the name which might be 1.0, 3.4, etc.

But for some reason the REST API seems to see a period and only take the stuff on the left of it.

So if the version number was 1.2 then the renamed file would end up being Test 1.docx. If the version number was 0.5 then it would be renamed as Test 0.docx.

Does anyone have any idea how to include the period and everything after it so I get something like Test 0.5.docx?

Below is the Power Automate steps.

grantjenkins_1-1615344139552.png

 

  • spoofan Profile Picture
    4 on 19 Apr 2023 at 08:55:54
    Re: Renaming SharePoint file using REST API with Power Automate cuts off everything when it sees a period

    It is not working anymore. I ended up by creating a new file, setting up the properties and deleting the old one.

  • TheBuyer Profile Picture
    4 on 20 Jan 2023 at 00:43:41
    Re: Renaming SharePoint file using REST API with Power Automate cuts off everything when it sees a period

    I am still having this issue. It only replaces the first part of the file name but not the file extension. Please help!

    TheBuyer_1-1674175410313.png

    TheBuyer_2-1674175434065.png

     

     

  • grantjenkins Profile Picture
    11,059 Moderator on 12 Mar 2021 at 00:04:47
    Re: Renaming SharePoint file using REST API with Power Automate cuts off everything when it sees a period

    Thanks so much - works perfectly. Note that I had to extract the file extension out of the "File name with extension" property - would be great if they just included a property with just the extension, but beggars can't be choosers 🙂

  • grantjenkins Profile Picture
    11,059 Moderator on 12 Mar 2021 at 00:03:20
    Re: Renaming SharePoint file using REST API with Power Automate cuts off everything when it sees a period

    See my reply.

  • Verified answer
    jinivthakkar Profile Picture
    4,181 on 10 Mar 2021 at 17:34:55
    Re: Renaming SharePoint file using REST API with Power Automate cuts off everything when it sees a period

    @grantjenkins you need to pass the filename with extension

     

    jinivthakkar_0-1615397629273.png

    I was able to reproduce the issue if I just pass 1.13 but if I pass 1.13.pdf  it works.

     

    You will also get file extension from Get file properties and then concat the name.version.extension and pass.

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete