Skip to main content
Community site session details

Community site session details

Session Id : O4HAo4T22mkeifqYpTE3BC
Power Automate - Building Flows
Answered

Overwrite file

Like (0) ShareShare
ReportReport
Posted on 19 Apr 2021 02:43:35 by 70

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.

  • Verified answer
    AK-47 Profile Picture
    70 on 19 Apr 2021 at 23:12:03
    Re: Overwrite file

    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.

  • AK-47 Profile Picture
    70 on 19 Apr 2021 at 08:38:59
    Re: Overwrite file

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

  • v-litu-msft Profile Picture
    on 19 Apr 2021 at 08:33:09
    Re: Overwrite file

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete