How to list files in the directory

98 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')

Accepted Answer

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

Sign in to comment.

More Answers (0)

Categories

Find more on File Operations in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!