View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
List files with specified suffix

4.0 | 1 rating Rate this file 2 Downloads (last 30 days) File Size: 2.16 KB File ID: #25610 Version: 1.2

List files with specified suffix



19 Oct 2009 (Updated )

%GETFILELIST generates a list of files with specified suffix under topDir.

| Watch this File

File Information

%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
% revised on 2009/10/26

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
16 Feb 2010 Andrea

Andrea (view profile)

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

20 Oct 2009 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.

Comment only
20 Oct 2009 Carlos Adrian Vargas Aguilera

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

Comment only
20 Oct 2009 1.1

2009/10/20 fixed a bug that outputFlag is not correctly set.

25 Oct 2009 1.2

log20091026 add check for '.','..' folders instead of skipping first two folders. line78-line90

Contact us