Is it possible to change an existing file's extension in a SP document library? I have seen many example on renaming the file's name but not the actual extension. For example is a file's name is file.html can i change it to file.aspx without having to create a new file and deleting the old one? Thanks!
Hi @skarthanal ,
I am not aware of an action for simply changing the file type with one action in Power Automate. you can Create a new file with the content and just pass in file name the new format with a concat() function. You can use directly Name with .xlsx like in my screenshot or use an expression
Thank you your response, I was aware of this but i was looking to retain the document id and not have to create a new one and delete the old file.
Maybe you can use the SharePoint API with the Send HTTP Request to SharePoint action.
maybe you can go with that approach
I tried this and got the flow to work however, it is not working as we expect. If the file already stored in the library is <FileName.aspx> and i want to change it to <NewFile.txt> the flow will run successfully but it only changes the file's name not the extension. I end up getting NewFile.html
Are you also passing in the extensions ?
I made a quick research and also found that it Wald solved with another api endpoint, maybe that helps https://powerusers.microsoft.com/t5/General-Power-Automate/Renaming-SharePoint-file-using-REST-API-w...
Yes i am passing the filename and extension within the body liek below. I even tried the new endpoint and it doesnt not change the actual extension.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.