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

Rename File in Sharepoint

I'd like to rename a file after I have sent it by e-mail.

Currently this isn't possbile.

 

What I have tried is to copy the file and then delete it, but the delete doesn't work (which is weird since the copy does...  But i keep getting the message that the file identifier cannot be found)

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff ashwinsa
Power Apps Staff

Re: Rename File in Sharepoint

Hi @stevenpauwels this should be possible. Please make sure to choose the "Id" from the return of the Create File operation.

 

 

Repro.PNG

 

Please try this out. If it doesn't work out, can you share me the flow details ?? You can paste the URL when the flow is open.

 

Hope this helps.

View solution in original post

11 REPLIES 11
Power Apps Staff ashwinsa
Power Apps Staff

Re: Rename File in Sharepoint

Hi @stevenpauwels this should be possible. Please make sure to choose the "Id" from the return of the Create File operation.

 

 

Repro.PNG

 

Please try this out. If it doesn't work out, can you share me the flow details ?? You can paste the URL when the flow is open.

 

Hope this helps.

View solution in original post

stevenpauwels
Level: Powered On

Re: Rename File in Sharepoint

Thanks, indeed it worked.

Is it just me, or is there still a lot of work to be done with regards to the documentation and info on what the dynamic references are used for??

 

Power Apps Staff ashwinsa
Power Apps Staff

Re: Rename File in Sharepoint

Glad to hear that it worked 🙂

 

The dynamic references are essentially outputs from the results of previous activities and our goal is to try and be as intuitive as possible to our customers. At the same time, we are also focusong on unifying and getting our documentation better.

 

Are there any specific topics that you think we should cover which could help the community ??

stevenpauwels
Level: Powered On

Re: Rename File in Sharepoint

It's hard to be specific I guess.  I'm currently only looking at what I need, and that's not for everyone's use.

 

But I do feel that now due to a lack of complex examples, it's a lot of trial and error.

I do feel that certain things are missing like:

- performing text changes in filenames (except for adding text)

- save pictures/word documents/... to PDF

 

I'm currently trying to create a flow based on an e-mail with a zip file, that saves the file in a different location based on the sender(working), then extracts the files (working), then deletes the zip files (working), then send an e-mail for each file in the extracted folders (now I'm stuk), then copies each sent file, and deletes the original.

awi1988
Level: Power Up

Re: Rename File in Sharepoint

im trying to implement this solution and it still does not work ........ meh microsoft~!

stevenpauwels
Level: Powered On

Re: Rename File in Sharepoint

You really need to work with the id's (and make sure you selected the right one, in order to do this.

Initially I tried working with filename and such, but that doesn't work at all..

Anonymous
Not applicable

Re: Rename File in Sharepoint

Guys, I respect that you can provide us these workarounds, every time there's an issue.

 

But we are humans with ephemeral storage, so these duct tapes aren't going to be maintainable for the long run.

 

And it honestly looks ridiculous to me that we have to create, copy, and delete file just to rename a file. While in Linux, you're good with SFTP or 'mv'.

 

80% of my time I've been working with Flow is workarounds, not focused on the functions/tasks.

Do not provide us with a half-baked product. I hope that for now you prioritize all of our issues, not your future features. Thank you.

rich8rd
Level: Powered On

Re: Rename File in Sharepoint

I'm able to rename a sp doc library file by using REST:

 

select "Send an HTTP request to SharePoint" action,

 

then follow the below article to fill up the header and body of the HTTP REST POST request: (I used option 1 with success)

 

https://sharepoint.stackexchange.com/questions/168014/change-filename-of-existing-file-on-sharepoint...

 

geommm
Level: Powered On

Re: Rename File in Sharepoint

Amazing that we have to go through all that hell to rename a file.
However, the fact that we can rename a file in onedrive and not in a sharepoint library makes me wonder if there IS a real reason.
G.

AIPedersen
Level: Powered On

Re: Rename File in Sharepoint

Couldnt agree more.
I have spend a lot of time to learn Flow and get acquainted with the features on the promise of high efficiency and automatisation.
Quickly you realise that the simplest task like renaming files and or updating excel files is impossible with Flow at this present stage. I tend to feel that I have wasted a lot of time on a product not yet ready to be implemented.

AIPedersen
Level: Powered On

Re: Rename File in Sharepoint

I have had the same issue as you and relied on the answers provided in this thread. I wasn't able to change the name with expressions in the name though and found a workaround (see link)

Rename-file-in-sharepoint-with-Expressions

thought i would dorp it here as an FYI
Brgds
Andreas

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

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 (5,122)