web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extract zip from email...
Power Automate
Answered

Extract zip from email, rename file and replace the master file on sharepoint

(2) ShareShare
ReportReport
Posted on by 14
Hi All!
 
I'm trying to update an existing file which my powerBI model gets its data from. So when a new zipped file arrives, i want it to replace the existing file and delete the zip file. The whole extract the zip and store it to sharepoint was no problem, but the renaming and replacing (and cleaning up the zip etc.) is giving me a headache. Anyone tackled this issue before? Could really use som help here. 
 
Thanks in advance.
Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,482 Most Valuable Professional on at
    Hey mate, Would it not be easier to first delete the file and then add the new file? You can use the "Delete File" action in SharePoint. If you have difficult in getting the file, you can use the "Get File" or "Get Files" action.
     
    In the "Get files" action you can use a filter query  and get the old file using the "Name".
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
     
    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
     
  • Gamst Profile Picture
    14 on at
    Hi CFernandes
     
    Thanks for the answer, deleting the file before extracting the new one would probably be easier yes. I appologize for bad phrasing in my question, not my native language. But the main issue for me is renaming the file after extracting it so that it maches the filename/path the PowerBI model uses to colletct data. 
     
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi,
     
    You should be able to use the Move file SharePoint action and configure it to replace the existing file.
     
    I don't see your flow so I am not sure what headaches you are getting from what you are trying.
     
    But I would take the zip, unzip it. Take the file you want to replace in the other location and simply use the Move, where you can rename it and copy over the other in one step.
     
    As for deleting, its possible that what you need to do is put a long Wait action, because once you open stuff etc it can be locked. So add this before you try to delete.
     
    Also I do NOT recommend deleting the file on the power bi side first and then copying. Replace it to trigger Power Bi's internal mechanisms.
     
     
  • Gamst Profile Picture
    14 on at
    FLMike, Thank you for the answer!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard