How to get the file names that start with the same letter in the folder?

18 ビュー (過去 30 日間)
PENGYUAN TAN
PENGYUAN TAN 2021 年 9 月 17 日
コメント済み: PENGYUAN TAN 2021 年 9 月 18 日
How to get the file names that start with the same letter in the folder?

採用された回答

KSSV
KSSV 2021 年 9 月 17 日
編集済み: KSSV 2021 年 9 月 17 日
f = dir('T*.bin') ;
N = length(f) ;
for i = 1:N
f(i).name
end

その他の回答 (2 件)

Matt J
Matt J 2021 年 9 月 17 日
編集済み: Matt J 2021 年 9 月 17 日
For example,
s=dir('T*_imag.bin');
fileNames={s([s.isdir]==0).name}

Chunru
Chunru 2021 年 9 月 17 日
fn = dir('T*.*') % you can use 'T*.T', 'T15*.bin', etc

カテゴリ

Help Center および File ExchangeFile Name Construction についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by