Rank: 236575 based on 0 downloads (last 30 days) and 0 file submitted
photo

Josiah McClurg

E-mail
Company/University
University of Iowa

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Josiah McClurg View all
Updated File Comments Rating
31 May 2012 DIRR (find files recursively filtering name, date or bytes) Lists files recursively filtering name date and/or size. Output can be set as name date and/or size. Author: Maximilien Chaumon

For those of you who want a more generic version, see my comment on http://www.mathworks.com/matlabcentral/fileexchange/32036-dirwalk-walk-the-directory-tree

31 May 2012 DIRWALK - Walk the directory tree Generate the file names and dir names in a directory tree by walking the tree. Author: Evgeny Pr

Functional, but I think it could be more concise and generic. Consider the following 12 lines:

function recurseDirectory(name, callback)
directory = dir(name);
for i = 1:length(directory)
if(~strcmp(directory(i).name,'.') && ~strcmp(directory(i).name,'..'))
if(directory(i).isdir)
recurseDirectory([name '/' directory(i).name], callback);
else
callback([name '/' directory(i).name]);
end
end
end
end

You can test the above code out with

recurseDirectory('.',@display)

if you like

Contact us