title: pysftp copying remote directory using get_r()
body: <p>I am trying to copy contents of a remote directory to my local directory using pysftp.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>cnopts = pysftp.CnOpts()
  cnopts.hostkeys = None
  
  p=pysftp.Connection("10.2.2.99",username= "user",
                     password="password", cnopts=cnopts)
  remote_path = '/cradius-data/files/webapps/vcm/somedirectory'
  local_path = 'E:\\New Folder\\FTP Download Folder'
  p.get_r(remotedir=remote_path,localdir=local_path)
  </code></pre>
  
  <p>I get the following File Not Found error message, </p>
  
  <pre><code>No such file or directory: 'E:\\New Folder\\FTP Download Folder\\./cradius-data/files/webapps/vcm/somedirectory/SOME_File.ZIP'
  </code></pre>
  
  <p>It seems that both the paths are being concatenated for some reason which is leading to an incorrect FileNotFound exception.
  Also ,I've verified that the file is present in the remote directory.
  Any help is much appreciated.</p>