title: List files on ftp using cURL in Matlab
body: <p>I'm trying to get a directory listing of files on an ftp server using cURL commands within Matlab.  Currently I'm trying something like:</p>
  <pre><code>[s,w] = dos('curl &quot;ftp://name:password@ftpurl/directory/&quot;');
  </code></pre>
  <p>which correctly gets the data and stores it in the variable w.</p>
  <p>To get a list of the files in that directory I could try to parse out the names from the 'w' variable, but that could get a little complicated.  Is there an easier way to obtain a list of the file names within the ftp directory, or do I have to go about trying to grab it out of the w variable?</p>
  <p>Thanks!</p>
  <p><strong>EDIT</strong></p>
  <p>Using the -l command:</p>
  <pre><code>[s,w] = dos('curl &quot;ftp://name:password@ftpurl/directory/&quot;');
  </code></pre>
  <p>The resulting w looks something like:</p>
  <blockquote>
  <p>0 0 0 763 0 0 2319 0 --:--:-- 2437FTPtest-D20110322-T022705.bot</p>
  <p>FTPtest-D20110322-T022705.idx</p>
  <p>FTPtest-D20110322-T022705.raw</p>
  <p>FTPtest-D20110322-T022746.bot</p>
  </blockquote>
  <p>So it looks much better, but since the first file doesn't have a line feed before, it may be a little more difficult.  Any ideas on how to get around this?</p>
  <p>Thanks!</p>