Recursive DIR
Find files recursively in a given folder.
C=dirrec('c:\windows') returns a cell C with the full pathname of all
files in the c:\windows folder and all its sub-folders.
C=dirrec('c:\windows','.exe') idem but returns only the files with
extension .exe.
C=dirrec('c:\windows','co*') idem but returns only the files starting with the two letters co (comsetup.log, control.ini, ...).
C=dirrec('c:\windows',{'.exe','.dll') idem but returns files with both
.exe and .dll extensions.
dirrec('c:\windows','.cmd') only displays the list of the .cmd files in
the Matlab command window
c:\windows\system32\login.cmd
c:\windows\system32\usrlogon.cmd
Note that extension should be given in lower case.
I was using the DDIR function by Maximilien Chaumon but it was not possible to compile ddir so I write my own function.
Luc
Citar como
Luc Masset (2024). Recursive DIR (https://www.mathworks.com/matlabcentral/fileexchange/15505-recursive-dir), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.