You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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);
Cite As
Rodney Thomson (2026). Recursive Directory Function Execution (https://se.mathworks.com/matlabcentral/fileexchange/20814-recursive-directory-function-execution), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (1.62 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
