Recursive Directory Function Execution
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);
Zitieren als
Rodney Thomson (2024). Recursive Directory Function Execution (https://www.mathworks.com/matlabcentral/fileexchange/20814-recursive-directory-function-execution), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 |