Using dir with multiple wildcards for directories

I'd like to be able to use dir to list all files in the grandchildren directories of my cwd, as in
dir('*/*')
As far as I can tell, this is impossible, is there a recommended workaround for this?
Thanks, Leo

 採用された回答

Geoff Hayes
Geoff Hayes 2014 年 11 月 20 日

1 投票

Leo - look in the File Exchange for a recursive directory listing submission. One such example is rdir.

1 件のコメント

Leo Simon
Leo Simon 2014 年 11 月 20 日
Thanks Geoff. rdir is exactly what I was looking for. For the benefit of others, typing
rdir('*/*')
gives more information than perhaps one would like, but, like dir,
D = rdir(*/*)
returns a struct so you can then extract just names, or modification dates.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeFile Operations についてさらに検索

タグ

質問済み:

2014 年 11 月 20 日

コメント済み:

2014 年 11 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by