cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AK-47
Helper I
Helper I

Overwrite file

Hello, I am trying to solve a flow problem and everything I try fails. This is extending on an existing flow that up to this point works.

 

I receive an email with a text file attached. That file is saved to a Sharepoint library, then the content is read in and then a new file is saved as a CSV as there is no way to change the file extension on the initial save.

 

However the email attachment file in txt form will overwrite with a new file each day, but the CSV file will not overwrite.

 

Any help to point me in the right direction would be appreciated.

Thanks

 

UPDATE: So after some time fiddling around I determined that I need to save the files in a temp directory, copy the file to the real directory which allows the "replace" option and then delete the source file from the temp directory.

 

All of this works except for the file deletion. The flow errors claiming that the file doesn't exist yet when I check the online Sharepoint directory the file is in there. Checking the outputs shows the correct path and filename.

1 ACCEPTED SOLUTION

Accepted Solutions
AK-47
Helper I
Helper I

I've solved this myself.

The solution was to save into a temp directory. Copy the update file to the real directory, then delete the file in the temp directory.

View solution in original post

3 REPLIES 3
v-litu-msft
Community Support
Community Support

Hi @AK-47,

 

You could follow these steps to delete the temp file just created:

Screenshot 2021-04-19 163149.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.

 

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.

AK-47
Helper I
Helper I

I'm already using Path. How would this method get a different result?

AK-47
Helper I
Helper I

I've solved this myself.

The solution was to save into a temp directory. Copy the update file to the real directory, then delete the file in the temp directory.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

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.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,937)