You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
USAGE:
selection = select_files(folder,pref,mid,suf,ext,type,path)
selection = select_files_rec(folder,pref,mid,suf,ext,type,fpath,levels)
INPUT:
- FOLDER: parent directory to look the files/folders in
- PREF: files/folders prefix
- MID: middle part of the files/folders
- SUF: files/folders suffix
- EXT: files extension
- TYPE: 'files' or 'folders'
- FPATH: 'path' (SELECTION will have the full path) or 'nopath' (only files/folders names)
- LEVELS: number of levels to go in recursively (0 [files/folders only from FOLDER], 1, 2, ..., Inf)
OUTPUT
- SELECTION: cell array containing the file/folder names
Cite As
Guilherme Coco Beltramini (2026). List files/folders recursively (https://www.mathworks.com/matlabcentral/fileexchange/41921-list-files-folders-recursively), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: Count number of lines in a set of files
General Information
- Version 1.1.0.0 (2.95 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
