Be the first to rate this file! 49 downloads (last 30 days) File Size: 2.16 KB File ID: #25610

List files with specified suffix

by Shiquan Wang

 

19 Oct 2009 (Updated 25 Oct 2009)

Code covered by BSD License  

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

Download Now | Watch this File

File Information
Description

%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

MATLAB release MATLAB 7.8 (R2009a)
Zip File Content  
Other Files getfilelist.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
20 Oct 2009 Carlos Adrian Vargas Aguilera

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

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.

Please login to add a comment or rating.
Updates
20 Oct 2009

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

25 Oct 2009

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

Tag Activity for this File
Tag Applied By Date/Time
gadget Shiquan Wang 19 Oct 2009 11:02:40
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com