2014 equivalent dir **\*.mat?
Ältere Kommentare anzeigen
Have created a gui in 2017b, after discovering that we have some, you could say, legacy simulations created in 2014b, I need to make it work with 2014b now. The dir **/*.mat function is was extremely helpful to me in first iteration. Despite being introduced in 2006a, it doesn't work as needed in 2014b.
Is it a syntax error possibly? Or was that functionality added later? Are other functions that could potentially provide me with the same functionality?
Many Thanks
3 Kommentare
Chase Ward
am 12 Dez. 2018
Steven Lord
am 12 Dez. 2018
Jan is correct. While the dir function has existed for a very long time, the capability to use ** to search folders and subdirectories recursively in the dir function was introduced in release R2016b.
Antworten (2)
Jan
am 12 Dez. 2018
0 Stimmen
You find many many functions for a recursive search in the file exchange: Search for "recursive dir":
1 Kommentar
Chase Ward
am 12 Dez. 2018
Image Analyst
am 12 Dez. 2018
0 Stimmen
See my attached demo to recursively search subfolders.
Also not sure why you don't just run the simulations in the modern version. Do they not work? If not, then why not fix them so they work with the latest version? Everytime I touch old code, I just bring it up to the latest version of MATLAB.
2 Kommentare
Chase Ward
am 12 Dez. 2018
Image Analyst
am 12 Dez. 2018
I guess I don't know why you need to develop more code. If you download the old version and run the old software on the old MATLAB release, which used to work, then why does it not work any longer such that you need new directory traversing code?
Kategorien
Mehr zu File Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!