function Upload(what, toWhere)


The Upload function upload the file(s) specified in the what parameter (supports wildcards) to the toWhere destination directory on the remote file server. This function is NOT recursive, therefore when using wildcards, this function will NOT upload matching files from sub-directories of the directory specified in the what parameter. For a recursive version of this function see the UploadR function.


Example:

{
 var scli = new SftpClient();
 scli.Host = 'your.sftpserver.com:22';
 scli.User = 'someusername';
 scli.KeyFile = './my_id.rsa';
 if (scli.Connect()) {
  // perform your file transfers...
  // ...
  scli.Upload('./docs/*.docx', '/archive/docs');
  // ...
  scli.Close();
 }
 scli = null
}