crawl_directories(file, varargin)
This function crawls directories to search for a specific file (e.g. "MyPicture.png") or all files specified by wildcards (e.g. "*.png") and returns all found occurences as a cell array containing the full path name(s).
Additional parameters may be specified as parameter-value pairs to determine the starting directory ('path'), the search direction ('direction'), the maximum number of files to be retrieved ('n') and the maximum number of directory levels to search ('depth'). Please refer to the help for details.
Examples
========
files = crawl_directories('*.png'); % Find all png-files below current directories
files = crawl_directories('MyPic.png', 'path','d:\pictures'); % Search for MyPic.png starting in d:\pictures
files = crawl_directories('*.m', 'path','d:\Matlab','n',40); % Find at most 40 m-files starting in d:\Matlab
Citar como
Sebastian Hölz (2024). crawl_directories(file, varargin) (https://www.mathworks.com/matlabcentral/fileexchange/56722-crawl_directories-file-varargin), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 |