Recursive directory listing of ROOT directory using DOS "DIR /S" command. In most cases this function is not as nice and useful as regular RDIR functions, however in my experience RDIR breaks down when dealing with massive directory trees, like finding few files in directory tree with tens of thousands of files, while this function is able to finish the job. RDIR_DOS is meant to be a workaround for cases when RDIR fails.
Jaroslaw Tuszynski (2021). rdir_dos (https://www.mathworks.com/matlabcentral/fileexchange/44089-rdir_dos), MATLAB Central File Exchange. Retrieved .
Inspired by: Recursive directory listing, Recursive directory listing - Enhanced RDIR
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Pretty good, although the %s in the following string really needs to be wrapped in double-quotes in case the directory/filename to be searched contains spaces: cmd_str = sprintf('dir %s /s/-c/4', rootdir);