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

Notifications

Announcements

Community site session details

Community site session details

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

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,402 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,335 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard