image thumbnail

SUBDIR *new*

version 1.0.0.0 (616 Bytes) by Elmar Tarajan
Recursively search for files and/or directorys under given folder without using of global variables.

7.2K Downloads

Updated 07 Dec 2004

No License

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 (2021). SUBDIR *new* (https://www.mathworks.com/matlabcentral/fileexchange/1492-subdir-new), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: RPCODE, folders sub-folders

Community Treasure Hunt

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

Start Hunting!