how to fetch files from each sub directory?
조회 수: 2 (최근 30일)
이전 댓글 표시
hi ..example.if i have a folder name as 'DATA',inside this subfolder namely 2000 to 2013(year) are ther..in this each folder(01 TO 12,say month),in each month folder,o1 to 31 days folder are ther,inside each days folder many .zip files are ther..i need to fetch all the .zip files inside main folder('DATA'),and extract them to a separate folder.is it possible? any defined function? i couldnt do with below code..help need
for kk=1997:2013
if exist(folder,'dir')
for ll=1:12
if exist(folder,'dir')
for mm=1:31
currfold=[folders(ii) '\*.zip'];
currfiles=dir(currfold);
%now do something with these files
for jj=1:length(currfiles)
unzip([folders(ii) '\' currfiles(jj).name],outputfolder);
end
end
end
end
end
end
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!