title: FTPClient can't open file, no such file or directory
body: <p>I've been trying to send a file to an ftp server via an FTPClient but when I get the reply string it says:</p>
  
  <blockquote>
    <p>553 Can't open file: No such file or directory.</p>
  </blockquote>
  
  <p>Here is the code:</p>
  
  <pre><code>try 
  {
      FTPClient client = new FTPClient();
      client.connect(hostname);
      client.login(username, password);
  
      client.setFileType(FTP.BINARY_FILE_TYPE);
      client.enterLocalPassiveMode();
      client.changeWorkingDirectory(workingDir);          
      File dir = new File(savePath + fileName);
      FileInputStream fIS = new FileInputStream(dir);
  
      for(File files : dir.listFiles())
      {
          boolean success = client.storeFile(files.getPath(), fIS);
          Toast.makeText(getBaseContext(), client.getReplyString(), Toast.LENGTH_LONG).show();
          Toast.makeText(getBaseContext(), files.getPath() + " Stored = " + success, Toast.LENGTH_LONG).show();
      }
  
      fIS.close();
      client.logout();
  } 
  catch (SocketException e) 
  {
      Toast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_LONG).show();
  } 
  catch (IOException e) 
  {
      Toast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_LONG).show();
  }
  </code></pre>
  
  <p>I've been looking all over the internet for answers but nothing has worked.</p>