Recursive directory walk with -exec (UNIX type)

Directory walking with input function handle called with each matching file found.
1,5K téléchargements
Mise à jour 10 mai 2010

Afficher la licence

See decription of RDIR (linked in Acknowledgements) for wildcard use.

Calls a function handle for each matching file found.


Recursive directory walk. EXECFUN is a function handle that gets called for each matching file found.The first input argument being the full path of the file, followed by the optional OPTEXECFUNARGS

ROOT is the directory starting point and includes the wildcard specification. Pathnames and wildcards may be used. Wild cards can exist in the pathname too. A special case is the double * that will match multiple directory levels, e.g. c:\**\*.m. Otherwise a single * will only match one directory level.
e.g. C:\Program Files\Windows *\

EXECFUN is a function handle which takes at least one input argument

OPTEXECFUNARGS are optional input arguments to EXECFUN


% To create a file list
rdirExec('c:\program files\windows *\**\*.dll',@callBack,fid)

%The callBack function has the following signature
function callBack(varargin)

Citation pour cette source

Ashish Uthama (2024). Recursive directory walk with -exec (UNIX type) (, MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2008b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
En savoir plus sur Search Path dans Help Center et MATLAB Answers

Inspiré par : Recursive directory listing

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version

*Fixed 'clear D' bug

text indents in desc