jdl
jdl

Reputation: 6323

do system level command to unzip a '*.tgz' file

I have some zip files that matlab:unzip can't extract. So I need to use matlab control over the DOS prompt and extract it using another program "7-zip". How would I do this in Matlab script? Is there a system level script to allow dos commands?

thx

Upvotes: 0

Views: 440

Answers (1)

yuk
yuk

Reputation: 19880

Use SYSTEM function:

system('7z e file.tgz')

or use ! (exclamation point) character:

!7z e file.tgz

Here is the documentation with more details and examples.

Upvotes: 5

Related Questions