You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
SUBDIR
returns all subfolder under current path.
P = SUBDIR('directory_name')
stores all subfolders under given directory into a variable 'P'
[P F] = SUBDIR('directory_name')
stores all subfolders under given directory into a
variable 'P' and all filenames into a variable 'F'.
use sort([F{:}]) to get sorted list of all filenames.
Cite As
Elmar Tarajan (2026). SUBDIR *new* (https://uk.mathworks.com/matlabcentral/fileexchange/1492-subdir-new), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: RPCODE, folders sub-folders
General Information
- Version 1.0.0.0 (616 Bytes)
-
No License
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 | the output of results in the new version is more user friendly. |
