I would like to list available directories and text files in specific directories recursively in Matlab command window (and ultimately in an m-file). I know commands like ls are available, but I would like to know the text files available in a string or vector before I recursively read each text file in the following file system structure:
master (contains A and B, all directories)
A contains A1 and A2 (all directories)
A1 contains A11, A12, A13, A14 (all directories)
A11 contains 1.txt, 2.txt, ...
Would be great to hear some feedback! Thanks in advance!