Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How do I use the recursive dir function in release 2016b?

1 Ansicht (letzte 30 Tage)
Petter Stefansson
Petter Stefansson am 11 Jun. 2016
Kommentiert: Kyle am 14 Jun. 2016
I’ve installed the pre-release version of matlab 2016b and one of the new features listed in the release notes is that the dir function can be used to recursively search into subfolders.
But what do I type to activate this? Its not in the “ help dir ” text or on the webpage. I’ve tried adding ‘recursive’ as an argument into dir but that’s not recognized.
Does anyone know how to use it? Or is there a place where you can read documentations on pre-release functions that I may have missed?
  2 Kommentare
Petter Stefansson
Petter Stefansson am 12 Jun. 2016
Question closed? What, am I not allowed to ask questions about a pre-release?
How are you supposed to help test out the new functions then if Mathworks doesn’t provide any documentation on how to use them? :S
Kyle
Kyle am 14 Jun. 2016
Hi Peter,
You can use the new recursive functionality of "dir" with wildcard characters to search all folders and subfolders, e.g.
>> dir('*\*.txt') % Search all folders (no subfolders) for ".txt" files.
>> dir('**\*.txt') % Search all folders and their subfolders for ".txt" files.
I do not see any new documentation for this functionality but this is what I have found based on my own experimenting with "dir". I hope this helps explain a bit of the new functionality.
- Kyle

Antworten (0)

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by