Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Overwrite file when creating a file in SharePoint

Hey guys,

in the recent flows I created it was normal that an existing file in SharePoint was simply overwritten when it had the same name as the new file. 
Right now I am creating a flow and Automate doesn't behave like this anymore, whenever I try to create a file with the same name I get an error.
Any solutions for that?

Thanks, Julian

Frequent Visitor

In my case, I decided to skip it, wasn't critical since I was putting them into appropriately named folders.
But you could add an extra step to rename the file before copying it, or after. Adds unnecessary complexity but we're used to that.

Continued Contributor
Continued Contributor

@Luber I tried renaming the file before copying it but same error, file is locked for shared use, cannot rename. I've now added a delay before the Create File action, had to increment it to 9 minutes to work (hopefully) all the times, if I increase to 10, it times out. What could it be that locks that file 7-8 minutes before the flow will actually be creating (and overwriting) it?

Frequent Visitor

@Beat I've had that issue in other contexts, seems inconsistent. Then I guess try copying the file then renaming the new copy...?

hello @EnriqueC , can you kindly explain how this worked? or what does it do? 

Does it affect any long run functionalities / does it affect any data?


Kindly mention your answer.

Hi @soumya_12  - I do not know exactly what this does, however, it has work perfectly for the past year. One of my flows runs weekly and overwrites ~500 PDFs that are between 5MB - 50MB. No issues so far. 


Hope this helps. Regards.

Thanks a lot for your response @EnriqueC . 

this worked for me thank you so much!

This solution doesn't seem to work anymore. 

EnriqueC 's solution below to turn off Chunking works.

Frequent Visitor

this is worked for me

Thanks a lot, it works for me.!!

Thank you so much! This worked for me.

Thanks, worked like a charm.

One question, is there a way to add a date stamp to each file (Export 28July2022, Export 29July2022) ?

This thread has the incorrect post marked as the solution, it is a shoddy workaround. The post this comment is replying to is the correct solution for this issue. Just turn off chunking, simple.

Helpful resources

October Events

Mark Your Calendars

So many events happening this month - don't miss out!



Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,752)