How to list files in the directory

64 visualizaciones (últimos 30 días)
Ompilela Tshikosi
Ompilela Tshikosi el 27 de Mayo de 2020
Comentada: Stephen23 el 27 de Mayo de 2020
How do i list file with certain prefix for instance file that include 'Data' in the directory and of certain type for instance only excel file ('.xlsx')

Respuesta aceptada

Stephen23
Stephen23 el 27 de Mayo de 2020
D = 'absolute/relative path to where the files are saved';
S = dir(fullfile(D,'Data*.xlsx'))
  2 comentarios
Ompilela Tshikosi
Ompilela Tshikosi el 27 de Mayo de 2020
Thank you. It worked
Stephen23
Stephen23 el 27 de Mayo de 2020
@Ompilela Tshikosi : I hope that it helped. Please remember to accept my answer!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre File Operations 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