How do I do a recursive search within multiple directory levels?

12 Ansichten (letzte 30 Tage)
Josh Lee
Josh Lee am 30 Apr. 2020
Beantwortet: Walter Roberson am 30 Apr. 2020
The data that I obtain is structured in a way where its files resside within a seemingly random number of folders within folders (some are within subdirectries, some are within 5 layers of misc. folders). I could count the number of files and do a multiple for-loops, but that seems inefficient. Is there a way to extract specfic files that are within multiple layers of folders into a directory?
I know the wildcard operator:
'**'
but it only seesm to search within subdirectories. I need to search even deeper than subdirectories. Is there a way to do this?

Antworten (1)

Walter Roberson
Walter Roberson am 30 Apr. 2020
path/*/target is searching one level of directory.
path/**/target searches any number of levels

Kategorien

Mehr zu File Operations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by