Fastest recursive search for files
古いコメントを表示
From this answer, I learned that dir can search recursively for files in subdirectories, and it is about 3X faster than what I had been using earlier, getfilenames. However now I am searching a remote directory containing many subdirectories with thousands of files, and the dir command takes 30+ minutes to execute. Is there a faster way? I am happy to call something outside of Matlab, like find in the accepted answer here.
採用された回答
その他の回答 (1 件)
Austin Fite
2025 年 4 月 21 日
編集済み: Austin Fite
2025 年 4 月 21 日
1 投票
This is an old thread at this point but I have a file exchange utility "fsfind" that is purpose-built for this application.
The inputs support regular expressions (see documentation for "regexp") and only subfolders that match the pattern will be searched. I use it to efficiently search very deep directory structures (10+ levels).
1 件のコメント
Adam Danz
2025 年 4 月 21 日
+1 thanks for sharing
カテゴリ
ヘルプ センター および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!