Recursive Directory Function Execution

Recurse through all directories executing the supplied function
1K download
Aggiornato 22 lug 2008

Visualizza la licenza

Recurses through each directory, passing the full directory path and any extraneous arguments (varargin) to the specified function.

Call Sequence : directoryRecurse(directory, function_pointer, varargin)

IE: To execute the 'rmdir' command with the 's' parameter over 'c:\tmp' and all subdirectories:

directoryRecurse('c:\tmp', @rmdir, 's');

Another useful example, add 'c:\matlab' and all sub directories to the Matlab path:
directoryRecurse('c:\tmp', @addpath);

Cita come

Rodney Thomson (2026). Recursive Directory Function Execution (https://it.mathworks.com/matlabcentral/fileexchange/20814-recursive-directory-function-execution), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R14SP2
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Search Path in Help Center e MATLAB Answers
Versione Pubblicato Note della release
1.0.0.0