dir search multiple files
Mostra commenti meno recenti
Hello,
I am using the dir command to search a folder for specific file types. I am looking for both *.jpg and *.png files. How do I structure my statement so that I can search for both file types?
Risposte (1)
Fangjun Jiang
il 19 Set 2011
7 voti
Files=[dir('*.jpg');dir('*.png')]
3 Commenti
Walter Roberson
il 19 Set 2011
I think that might be the only option on MS Windows.
On OS-X or Linux there might be an additional more obscure method,
dir('*.{jpg,png}')
This should NOT be expected to work on MS Windows.
Michael
il 10 Set 2014
I know this is an old link, but it totally saved me. Thanks!
Steve Grobler
il 9 Mar 2018
helped me too!!
Categorie
Scopri di più su File Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!