title: PSFTP Recursive Delete
body: <p>I'm trying to set up an automated SFTP backup from my local machine to a remote NAS.</p>
  
  <p>I've got a batch script that calls PSFTP. I'm looking to mirror a local directory to a remote directory. PSFTP doesn't have a mirror command, but it can do a recursive PUT. So I thought I'd try to do delete the directory on the SFTP server and then do the recursive PUT, which would accomplish the same thing. PSFTP doesn't support a recursive DEL, though, nor can you do RMDIR on a non-empty directory.</p>
  
  <p>So, in a Windows batch environment, how can I delete the remote directory before I upload it?</p>