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.

View solution in original post

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (39,066)