How to list files in the directory

67 visualizzazioni (ultimi 30 giorni)
Ompilela Tshikosi
Ompilela Tshikosi il 27 Mag 2020
Commentato: Stephen23 il 27 Mag 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')

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su File Operations in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by