title: FTP multiple files using apache commons into a local directory
body: <p>I am trying to download All files in a directory to my local machine using apache commons like this:</p>
  
  <pre><code>import java.io.FileOutputStream;
  import org.apache.commons.net.ftp.FTPClient;
  import java.io.IOException;
  import java.net.SocketException;
  import org.apache.commons.net.ftp.FTPFile;
  
  public class FTPExample {
      public static void main(String[] args) throws SocketException, IOException {
          FTPClient client = new FTPClient();
          client.connect("MyHostName");
          client.enterLocalPassiveMode();
          client.login("username", "password");
          FTPFile[] files = client.listFiles("/App/");
          for (FTPFile file : files) {
              System.out.println(file.getName());
            FileOutputStream fos = new FileOutputStream("Ftp Files/"  + file.getName());
              client.retrieveFile(file.getName(),fos);             
          }
      }
  }
  </code></pre>
  
  <p>Am able to list the Files in the Directory but I am Getting FilenotFound Exception when trying to Download the files. Please help.
  My Error is:</p>
  
  <pre><code>Exception in thread "main" java.io.FileNotFoundException: Ftp Files\01 (The system cannot find the path specified)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:212)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:104)
      at ftpexample.FTPExample.main(FTPExample.java:30)
  Java Result: 1
  </code></pre>
  
  <p><strong>EDIT: I need the files to be stored in the Folder Ftp File/ in their original file names.</strong></p>