title: how do i print all file names under a folder in matlab
body: <p>I want to display all the files in a folder in matlab. The following code is what i have so far</p>
  
  <pre><code>s = dir('D:\BOOKS');
  </code></pre>
  
  <p>Now it gives a struct with the following fields</p>
  
  <pre><code>    name
      date
      bytes
      isdir
      datenum
  </code></pre>
  
  <p>I need to loop through the name struct but how do i get its length ? my attempt</p>
  
  <pre><code>length(s.name); wont run
  size(s.name); wont run
  </code></pre>
  
  <p>I am out of tries now. Could someone please help me out with this problem.</p>