dir method stops at 1000 files sometimes
2 ビュー (過去 30 日間)
古いコメントを表示
I have been struggling with the dir function lately.
the dir method often stops enumerating the directory at 1000 files. If I query enough times, I will finally get the correct count. see below (copied from matlab command line) where I have called dir two times in a row and get drastically different answers. nothing changed between calls....I called one right after the other. Has anyone had this issue or found a workaround?
This is a network drive I'm reading so that may be part of the issue.
>> sublist = dir([imdir_win '\*.tif*'])
sublist =
1000×1 struct array with fields:
>> sublist = dir([imdir_win '\*.tif*'])
sublist =
7066×1 struct array with fields:
2 件のコメント
Image Analyst
2023 年 12 月 14 日
編集済み: Image Analyst
2023 年 12 月 14 日
sublist = dir(fullfile(imdir_win, '*.tif*'))
Walter Roberson
2023 年 12 月 14 日
Unfortunately the fact that it is a network drive has everything to do with it.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!