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

16 visualizaciones (últimos 30 días)
How to get the file names that start with the same letter in the folder?

Respuesta aceptada

KSSV
KSSV el 17 de Sept. de 2021
Editada: KSSV el 17 de Sept. de 2021
f = dir('T*.bin') ;
N = length(f) ;
for i = 1:N
f(i).name
end

Más respuestas (2)

Matt J
Matt J el 17 de Sept. de 2021
Editada: Matt J el 17 de Sept. de 2021
For example,
s=dir('T*_imag.bin');
fileNames={s([s.isdir]==0).name}

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

Categorías

Más información sobre File Name Construction en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by