how to unzip files using loop?
7 次查看(过去 30 天)
显示 更早的评论
i have 1000 .zip files in single folder. i need to unzip all these and store in new folder using loop statement r any in matlab..help me with this..i don't want to waste time by doing unzipping manually
0 个评论
采纳的回答
Andreas Goser
2013-7-31
You could help others helping yourself by providing information of what you already have tried. Right now I only can say use the commands DIR, FOR and UNZIP and you are done.
0 个评论
更多回答(1 个)
David Sanchez
2013-7-31
zip_files = dir('*.zip');
for k = 1:numel(zip_files)
unzip(zip_files(k).name,'output_directory_here');
end
3 个评论
rui gao
2019-7-15
Hi David,
I meet a problem when I unzip my '*.zip' files through the way you mentioned.
My original '*.zip' files contain '*.jpg' files, and once I use your code to unzip a list of '*.zip' files, it shows:
Unable to write file "xxx.jpg".
The entry may be password-protected or encrypted.'
Could you please give me some hints? Many thanks.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!