File Exchange

image thumbnail

List files with specified suffix

version 1.2.0.0 (2.16 KB) by Shiquan Wang
%GETFILELIST generates a list of files with specified suffix under topDir.

1 Download

Updated 25 Oct 2009

View Version History

View License

%GETFILELIST generates a list of files with specified suffix under topDir.
% This function lists files with specified suffix under topDir. It
% searches all levels of subfolders.
%
% FileList: a cell to store the list.
% topDir: top directory in which files are searched.
% suffix: type of files to search, default by AVI.
% outputFlag: a bool value to determine whether an output file is
% generated.
%
% Shiquan Wang @ CASIA
% sqwang@nlpr.ia.ac.cn/shiquanwang@gmail.com
% http://www.cbsr.ia.ac.cn/users/sqwang/
% revised on 2009/10/26

Cite As

Shiquan Wang (2020). List files with specified suffix (https://www.mathworks.com/matlabcentral/fileexchange/25610-list-files-with-specified-suffix), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Andrea

I was looking for something like the DOS command "dir *.xxx /s" and that's it!
Very useful!
Thank you

Shiquan Wang

To Carlos
Thanks for your suggestion. dir with '*' will do the same. My inten tion is to list all files even they are in subfolders for the ease of further use.

You may use LS with wildcard '*' and that's it.

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!