cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wsalling
Helper III
Helper III

will Not Overwritting Sharepoint existing file

i have a flow that creates a file in sharpoint using Create File but if that file exists already, instead of overwriting it, it is crashing saying file exists.  We have versioning turned on the site as well.  am i missing a step? Works fine if file is not already there.

How can i get it to overwrite it or skip to next file in list to be created.

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @wsalling,

 

You could use Create file action create the file in another folder, the use Get file properties action to get the file identifier could be used in Copy file action. Use the Copy file, you could set the If another file is already there to Replace. After all, delete the file created at the beginning.

Annotation 2020-06-29 105859.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
ChristianAbata
Super User
Super User

hi @wsalling  unfortunally the action Create File don't Overwrites Existing Files, I suggest you to add some text in your file name like and ID to create New Files



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Thank you, is there a way to see if the file exists? then i could skip the create file process?

yes @wsalling  you can use list files action to get all the names files in a folder then you can use a condition to compare if the name you have is equals to the name file exist then do nothing.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
v-litu-msft
Community Support
Community Support

Hi @wsalling,

 

You could use Create file action create the file in another folder, the use Get file properties action to get the file identifier could be used in Copy file action. Use the Copy file, you could set the If another file is already there to Replace. After all, delete the file created at the beginning.

Annotation 2020-06-29 105859.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@ChristianAbata

 

Did the Create File action change recently? The last time I used the Create File action in a flow, I did not have an issue with any existing files having the same name; if there was an existing file, the flow replaced the existing file and maintained versioning history.

Yes, This is something started happening recently from new flows. It looks like there was a change in create file in sharepoint. Anyone got any solution?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,613)