FUNCTION REFERENCE

unzip

Extract the files of a ZIP archive.

Extract the files of a ZIP archive.

Syntax

unzip(zipfilename)

Syntax

filenames = unzip(zipfilename, outputfolder)

Extracts into outputfolder (created when missing) or the current folder and returns the extracted file names, last entry first, as MATLAB does. Entry names that would leave the output folder are refused.

Example

d=tempname(pwd); mkdir(d); fid=fopen(fullfile(d,'a.txt'),'w'); fprintf(fid,'hi'); fclose(fid); zip(fullfile(d,'a.zip'),'a.txt',d); unzip(fullfile(d,'a.zip'),fullfile(d,'out')); t=fileread(fullfile(d,'out','a.txt')); rmdir(d,'s'); t   % hi

Differences from MATLAB: URLs are not supported; at most 10000 entries and 256 MiB of extracted data.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.