You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This functions goal is to return a list (cell array) of names of sub-folders located under user defined folders list. The input should be a a cell array of parent directories names. The function also supports input of a single directory name string.
Alternatively, the user can choose the folders using the OS explorer- by enabling the 'flagGUI' input.
Function properties:
- It is not recursive but iterative.
- It does not change the current folder (not using "cd" command).
- It uses "ls" function, which is supposed to be faster than "dir" function.
- According to some measurements I've made it runs faster than the alternatives.
- I also believe it is clearly written and documented, so it should be easy to understand and maintain.
Cite As
Nikolay S. (2026). folders sub-folders (https://au.mathworks.com/matlabcentral/fileexchange/41135-folders-sub-folders), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: SUBDIR *new*
Inspired: Folders tree files list, List of files from directories/files list or browser, Files to folders based on properties, apply2VideoFrames
General Information
- Version 1.2.0.0 (4.34 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
