Genpath is excluding package folders
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Matthew Brown
il 18 Ago 2017
Commentato: Walter Roberson
il 23 Ago 2017
Hello,
I am writing a script that requires to know every folder and subfolder, for which genpath() works perfectly.
However, there are a few folders that are packages (and begin with a '+'), and genpath ignores those.
Is it possible to have genpath include those, or some other way to automatically include that?
Thanks!
1 Commento
Walter Roberson
il 23 Ago 2017
No, it is not possible to set any flags or pass any options to genpath to cause it to return + directories: processing of them is hard-coded. genpath also removes @ directories.
Risposta accettata
Image Analyst
il 18 Ago 2017
Try using dir() with double asterisks. See the help or my attached demo.
2 Commenti
Walter Roberson
il 23 Ago 2017
You can look in File Exchange for one of the several recursive directory functions, such as https://www.mathworks.com/matlabcentral/fileexchange/32226-recursive-directory-listing-enhanced-rdir
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Search Path in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!