How to list files in the directory

102 Ansichten (letzte 30 Tage)
Ompilela Tshikosi
Ompilela Tshikosi am 27 Mai 2020
Kommentiert: Stephen23 am 27 Mai 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')

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu File Operations finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by