Skip to main content

Notifications

Community site session details

Community site session details

Session Id : d1FLn2FDAPZhHZwv5dC6JO
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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started