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

16 vues (au cours des 30 derniers jours)
PENGYUAN TAN
PENGYUAN TAN le 17 Sep 2021
Commenté : PENGYUAN TAN le 18 Sep 2021
How to get the file names that start with the same letter in the folder?

Réponse acceptée

KSSV
KSSV le 17 Sep 2021
Modifié(e) : KSSV le 17 Sep 2021
f = dir('T*.bin') ;
N = length(f) ;
for i = 1:N
f(i).name
end

Plus de réponses (2)

Matt J
Matt J le 17 Sep 2021
Modifié(e) : Matt J le 17 Sep 2021
For example,
s=dir('T*_imag.bin');
fileNames={s([s.isdir]==0).name}

Chunru
Chunru le 17 Sep 2021
fn = dir('T*.*') % you can use 'T*.T', 'T15*.bin', etc

Catégories

En savoir plus sur File Name Construction dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by