image thumbnail

subdir: a recursive file search

version 1.1.0.0 (3.87 KB) by Kelly Kearney
Performs a recursive file search using same input and output format as dir function

8.5K Downloads

Updated 16 Aug 2016

From GitHub

View license on GitHub

This function performs a recursive file search. Its advantage over other FEX programs offering the same thing is that it uses the same input and output format as Matlab's dir function, and can therefore be used interchangeably.
Example:

>> a = subdir(fullfile(matlabroot, 'toolbox', 'matlab', '*.mat'))

a =

66x1 struct array with fields:
name
date
bytes
isdir
datenum

>> a(1)

ans =

name: '/Applications/MATLAB74/toolbox/matlab/audiovideo/chirp.mat'
date: '14-Mar-2004 10:31:48'
bytes: 25276
isdir: 0
datenum: 7.3202e+05

Cite As

Kelly Kearney (2021). subdir: a recursive file search (https://github.com/kakearney/subdir-pkg), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

subdir

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.