title: How do I copy a directory using Ganymed's SCPClient?
body: <p>I need to recursively copy a directory (C:\test in this case) to a remote host. I tried the obvious:</p>
  
  <pre><code>conn.connect();
  conn.authenticateWithPassword("user", "pw");
  SCPClient scp = conn.createSCPClient();
  scp.put("C:/test", "~/test");
  conn.close();
  </code></pre>
  
  <p>but this gives the error:</p>
  
  <pre><code>java.io.IOException: Error during SCP transfer.
      at ch.ethz.ssh2.SCPClient.put(SCPClient.java:577)
      at ch.ethz.ssh2.SCPClient.put(SCPClient.java:535)
      at ch.ethz.ssh2.SCPClient.put(SCPClient.java:430)
      at Test.Test.main(Test.java:57)
  Caused by: java.io.FileNotFoundException: C:\test (Access is denied)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.&lt;init&gt;(Unknown Source)
      at ch.ethz.ssh2.SCPClient.sendFiles(SCPClient.java:190)
      at ch.ethz.ssh2.SCPClient.put(SCPClient.java:573)
      ... 3 more
  </code></pre>
  
  <p>Am I missing something, or can Ganymed really only copy individual files, but not directories? Should I just <code>exec()</code> the appropriate scp command on the shell?</p>