Created
November 2, 2015 00:10
-
-
Save rysk-t/cdce72f1931b7eef0b39 to your computer and use it in GitHub Desktop.
あるフォルダ以下のサブフォルダのリストを作る => 任意の拡張子のファイルパスを取得 (ここでは*.jpg)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ldirs = genpath(pwd); | |
| ldirs = [';' ldirs]; | |
| sepidx = strfind(ldirs, ';'); | |
| for i = 1:length(sepidx)-1 | |
| gpath{i} = ldirs(sepidx(i)+1:sepidx(i+1)-1); | |
| end | |
| j = 1; | |
| for i = 1:length(gpath) | |
| fpathcur = dir([gpath{i} '\*.mdf']); | |
| if length(fpathcur)>0 | |
| for f =1:length(fpathcur) | |
| mdfs.full{j} = [gpath{i} '\' fpathcur(f).name]; | |
| mdfs.file{j} = fpathcur(f).name; | |
| j = j+1; | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment