function RenDir(currentDirName, newDirName)


The RenDir function renames a directory. The currentDirName directory must exist, and the newDirName directory must not exist, otherwise this command will fail and return false. If the command succeeds, and the directory is successfully renamed, then this function will return true.

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.RenDir('/docs/yours', '/docs/mine');
  // ...
  scli.Close();
 }
 scli = null
}