Unzip will not work on some archives
29 views (last 30 days)
Show older comments
Matthew Rademacher
on 11 Apr 2023
Edited: Matthew Rademacher
on 26 Apr 2023
When I run the unzip function, it will fail on certain archives. What really confuses me is that I can extract an archive's contents manually via the gui (right click an archive -> unzip).
Error message is simply "Invalid ZIP file:
C:\users\Desktop\myzipfile.zip"
The zip file is not invalid, and it is not corrupted
Accepted Answer
chrisw23
on 12 Apr 2023
Edited: Walter Roberson
on 14 Apr 2023
try to use .net Functionality (Windows OS assumed)
asm = NET.addAssembly("System.IO.Compression");
import System.IO.Compression.ZipFileExtensions.*
ZipFileExtensions.ExtractToFile(...
ZipFileExtensions.ExtractToDirectory(...
% search for system.io.compression.zipfileextensions.extracttodirectory to get the argument list
11 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!