MATLAB: How to show all files within all subdirectories of a specified directory in MATLAB

directoryMATLABpathsystem

How can I show all files within all subdirectories of a specified directory in MATLAB?

Best Answer

You can generate all the directories of the current folder you are on by using the "system" command and the operating system's "dir" as input:
 
>> [status, cmdout] = system('dir /s /b');
The output of the command is in "cmdout".