title: How to list a folder using FluentFTP
body: <p>I am implementing FluentFTP in my application but I cannot list the contents of a folder on the FTP server.<br>
  When I use an ftp application like FileZilla I can clearly see that in my user directory there are 2 folders :  </p>
  
  <p><a href="https://i.stack.imgur.com/M0zpd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M0zpd.jpg" alt="enter image description here"></a>  </p>
  
  <p>The Out folder contains some files, but when I retrieve a listing using FluentFTP I always get these 2 folders, not the contents of the Out folder.</p>
  
  <p>This is the code I am using  </p>
  
  <pre><code>FtpClient client = new FtpClient();
  client.Host = _ftpDefinition.Host;
  client.Port = _ftpDefinition.Port;
  client.Credentials = new NetworkCredential(_ftpDefinition.UserName, _ftpDefinition.PassWord);
  client.Connect();
  
  foreach (FtpListItem item in ftpClient.GetListing(remoteDir))
  {
      if (item.Type == FtpFileSystemObjectType.File)
      {
           _remoteFiles.Add(item.Name); // add the filename to a List&lt;string&gt;
      }
  }
  </code></pre>
  
  <p>I tried these combinations for the variable remoteDir :</p>
  
  <pre><code>Out
  /Out
  Out/
  /Out/
  </code></pre>
  
  <p>none of them is working, the GetListing always retuns the 2 folders in stead of the contents of the Out folder.</p>
  
  <p>What am I doing wrong ?</p>