dir search multiple files

11 次查看(过去 30 天)
Lana
Lana 2011-9-19
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?

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2011-9-19
Files=[dir('*.jpg');dir('*.png')]
  3 个评论
Michael
Michael 2014-9-10
I know this is an old link, but it totally saved me. Thanks!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by