I need to unzip files automatically in my matlab and when I use the unzip function, I can't unzip a file ending in .sp3.zip.
I need a solution, being able to use some external command, anything, however, needs to be fast because I will work with a large volume of data.
Attached is an example of the data I'm trying to unzip and can't.

 Accepted Answer

The file is not zip and is not gzip either.
If you happen to be using Mac or Linux, then rename the file to end with .Z and then use the system uncompress utility
!cp igs18143.sp3.zip igs18143.sp3.Z
!uncompress *.Z

5 Comments

I don't use linux, I use Windows 10.
And this file, I can unzip it manually, but via code I can't and I really need this to be done automatically to proceed with my code.
I suspect that 7zip could handle the files.
Download 7zip
  • install 7z in your machine
  • set the path in Environment Variables -> User Variables path -> edit -> new (add the path - C:\ProgramFiles\7-Zip) -> OK
Once the above is done then inside matlab
filename = 'igs18143.sp3.zip'
cmd = sprintf('7z.exe e "%s"', filename)
[status, msg] = system(cmd)
It finally worked out, thank you very much.
Plus it worked really fast.
Which decompress program did you end up using?

Sign in to comment.

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Release

R2018a

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!