title: Upload all files matching wildcard to SFTP
body: <p>I am using Tamir SharpSSH for transferring files from remote to local and vice versa with no issues. </p>
  
  <p>But, when trying to upload multiple XML files via SFTP but I am receiving an error:</p>
  
  <blockquote>
    <p>Illegal characters in path. </p>
  </blockquote>
  
  <p>If I try to upload using the exact file name it transfers the file without any issues. </p>
  
  <p>Every time I try to upload two XML files:</p>
  
  
  
  <pre><code>KDO_E2D_A21_AA769_20170124_143123.xml
  KDO_E2D_A21_AA776_20170130_143010.xml
  </code></pre>
  
  
  
  <pre><code>string ftpURL = "11.11.11.1";
  string userName = "Aaaaaa"; //User Name of the SFTP server
  string password = "hah4444"; //Password of the SFTP server
  int port = 22; //Port No of the SFTP server (if any)
  
  //The directory in SFTP server where the files will be uploaded
  string ftpDirectory = "/home/A21sftp/kadoe/";
  
  //Local directory from where the files will be uploaded 
  string localDirectory = "E:\\Zatpark\\*.xml"; 
  
  Sftp Connection = new Sftp(ftpURL, userName, password);
  Connection.Connect(port);
  Connection.Put(localDirectory, ftpDirectory); 
  Connection.Close();
  </code></pre>