MATLAB Answers

How to list files in the directory

3 views (last 30 days)
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')

  0 Comments

Sign in to comment.

Accepted Answer

Stephen Cobeldick
Stephen Cobeldick on 27 May 2020
D = 'absolute/relative path to where the files are saved';
S = dir(fullfile(D,'Data*.xlsx'))

  2 Comments

Stephen Cobeldick
Stephen Cobeldick on 27 May 2020
@Ompilela Tshikosi : I hope that it helped. Please remember to accept my answer!

Sign in to comment.

More Answers (0)

Tags


Translated by