Skip to main content

Notifications

Power Automate - Building Flows
Answered

Zipping files, results in error "already exists but it isn't a valid zip archive"

(1) ShareShare
ReportReport
Posted on by 8
Now this error makes senses, however, my action (Zip Files) works if I zip a subdirectory within the folder I'm trying to zip in entirety.
 
I have a large folder structure (C:\Users\Mike Bosko\Documents\ArcGIS\Projects) containing several arcgis projects.  Each project folder has a folder structure of it's own and some files can be large.
 
My action is set as follows:
Archive path: C:\Users\Mike Bosko\Documents\ArcGIS\GIS_Projects.zip
File(s) to zip: C:\Users\Mike Bosko\Documents\ArcGIS\Projects\
 
Run like this, I get the error:
 
Correlation Id: 113afcbd-0f94-4667-9cab-a0b17ec9307c
Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: 'C:\Users\Mike Bosko\Documents\ArcGIS\GIS_Projects.zip' already exists but it isn't a valid zip archive
   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)
 
HOWEVER, if I simply select a subfolder inside (aka, one of my individual project folders) it works just perfectly.
 
That is, if the action is set as follows:
Archive path: C:\Users\Mike Bosko\Documents\ArcGIS\GIS_Projects.zip
File(s) to zip: C:\Users\Mike Bosko\Documents\ArcGIS\Projects\Lnaches
 
I'm assuming this has something to do with the folder's size (~40gb) - vs the size of a single project folder (~4gb).  I'm just not sure how to nail down what is causing this error.  I **can** zip the full Projects folder manually without issue.
  • Suggested answer
    Nived_Nambiar Profile Picture
    Nived_Nambiar 17,110 on at
    Zipping files, results in error "already exists but it isn't a valid zip archive"
    Hi,
     
    so size would be the issue. Just found some useful information over internet regarding same, could you try to execute the zipping via powershell script and see whether that works ?
     
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
     
  • MB-30081925-0 Profile Picture
    MB-30081925-0 8 on at
    Zipping files, results in error "already exists but it isn't a valid zip archive"
    And NO, the zip file never gets created when zipping the full folder.  It does, however, get created properly when only zipping one of the subfolders. This is truly unfortunate - zip works fine when I run it manually (using File Explorer, Compress to | Zip file).
  • MB-30081925-0 Profile Picture
    MB-30081925-0 8 on at
    Zipping files, results in error "already exists but it isn't a valid zip archive"
    Thanks, yes, I've tried different compression methods - all result in the same.  It seems like it barely gets started zipping before it errors out. When doing this manually, it takes about 30minutes - this errors out within 25 seconds of starting the process.
  • Suggested answer
    Nived_Nambiar Profile Picture
    Nived_Nambiar 17,110 on at
    Zipping files, results in error "already exists but it isn't a valid zip archive"
    Hi,
     
    seems like file size is the issue may be, could you try with different options under Compression level and see whether anything works for you ?
     
    Also when error is thrown - does the zip file is created there ?
     
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard