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
MATLAB: How to unzip files using loop
dirmovefileunzipzip
Related Solutions
A) I suggest you re-write using fullfile()
B) You refer to zip_files.name but you constructed zip_files as a string. It looks to me as if at some point you had a dir() in there. But remember that if you dir() then you need to loop around the results, and remember that the .name fields does not include the directory, so you would normally need to fullfile() to reconstruct the complete path. Which is a problem if you are using wildcards on the directory because you would not know which directory you were in.
I think you might want to have a look at https://www.mathworks.com/matlabcentral/fileexchange/32226-recursive-directory-listing-enhanced-rdir
Support for inserting characters t ypes has been incorporated in Release 2012b (R2012b). For previous product releases, read below for any possible workarounds:
There is a limitation in Database Toolbox 3.10 (R2012a) in the way that it does not support nchars containing only one character.
To work around this limitation please install the attached patch:
1. Log in to an account with appropriate permissions to overwrite files in your MATLAB installation. On Linux systems, this is typically the root account.
2. Locate your MATLAB installation by typing matlabroot at the MATLAB command prompt. This folder is referred to as <MATLAB> in subsequent steps.
3. Exit MATLAB.
4. Download the attached .zip file associated with this Bug Report and store the file in the <MATLAB> folder.
5. Make a backup copy of each of the files listed in the .zip file. To see the contents of the .zip file open the .zip file in Winzip or Linux equivalent and look at the contents.
6. Extract the files from the .zip file.
a. Open the .zip file.
b. Extract the contents of the file to your <MATLAB> folder.
7. Delete the .zip file in the <MATLAB> folder.
Best Answer