title: FTP client - listfiles
body: <p>I am unable to get the exact file list using FTPClient. Sample code as below :</p>
  
  <pre><code>FTPClient client = new FTPClient();
  client.connect("x.x.x.x");
  client.login("abcd", "abcd");
  FTPFile[] ftpFiles = client.listFiles();
  for (FTPFile ftpFile : ftpFiles) {
     System.out.println("FTPFile: " + ftpFile.getName());
  }
  </code></pre>
  
  <p>I tried to set to PASV mode using enterLocalPassiveMode()/enterRemotePassiveMode()/pasv(). But, it doesnt work.</p>
  
  <p>Please also check <a href="https://stackoverflow.com/questions/2339855/apache-commons-ftpclient-listfiles">Apache Commons FTPClient.listFiles</a> .. </p>
  
  <p>Thank you</p>