title: Get all filenames inside a directory on FTP [Python]
body: <p>Today I ran into a big problem and because I'm fairly new with Python I'm really going to need to ask for help.</p>
  
  <p>I've managed to connect to my FTP and login correctly.</p>
  
  <pre><code>ftp = ftplib.FTP('ftp.lala.com', 'username', 'pass')
  </code></pre>
  
  <p>As a second step I move into the dir that I'd like:</p>
  
  <pre><code>ftp.cwd("dirName")
  </code></pre>
  
  <p>But then I run stuck.. I now need to get all the filenames in a string / array / list / .. format to be able to use all those names. I've tried OS, glob, .. but this doesn't seem to work in any way.
  Any thoughts please? I would need to get every filename inside the dir that I want and also any directories/files within the wanted dir.</p>
  
  <p>I somehow need to change this</p>
  
  <pre><code>for fileName in glob.glob("*.*"):
      self.out(fileName)
  </code></pre>
  
  <p>to go to the path ftp.lala.com/myDir/ and then get all the filenames out (also if there is a folder inside myDir)</p>
  
  <p>Any suggestions or ideas are welcome!
  Thanks
  Yenthe</p>