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?
Solved! Go to Solution.
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.
@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?
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 @Anonymous - 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.
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.
Not sure it's wise to use this hack.
The proper way to do this is to use "Get Files (properties only)" filter by filename.
Then add a condition.
If the file exists use the "Update File" action
If the file does not exist, use the "Create File" action
It's more work, but that hack is not always guaranteed to work.