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 / Automatically Zip indi...
Power Automate
Answered

Automatically Zip individual subfolders of a folder and save them separately

(0) ShareShare
ReportReport
Posted on by 4

I'd like to zip all the subfolders of a folder in individual zip files, but the flow I've created keeps failing, with the error not giving any details beyond “Failed to zip files”

 

 

WeRun_0-1665173906178.png

 

 

The flow is basically
1) get all the subfolders inside the folder.

 

WeRun_1-1665174086999.png

WeRun_2-1665174145950.png

 

 

2) Loop through each entry of the array

WeRun_3-1665174177350.png

 

 

2.1) Zip the specific entry of the array

WeRun_4-1665174195117.png

 

 

WeRun_5-1665174226118.png

 

 

Can someone help me figure this out?

 

Here's the full log

 

: Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Failed to zip files
 at Microsoft.Flow.RPA.Desktop.Modules.Compression.Actions.ZipFiles.Execute(ActionContext context)
 at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

 

 

 

I have the same question (0)
  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    First, does %FolderPath% happen before Get subfolders?  You use it in get subfolders, so it has to be declared and correct before then.

     

    Second the end of the loop is at %Folders.Count - 1%.  Since it is 0 index, everything is -1.

     

    For archive path, just try %FolderPath%\%Folders[LoopIndex].Name%.zip and for Files to zip, try %Folders[LoopIndex]%

     

    Good luck!

     

     

     

     

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard