title: rsync command is giving error No such file or directory (2)
body: <p>I am trying to transfer  a file using in remote desktop which will create the directory tree as well in remote desktop as specified.I am using below command but its not working when directory is not present in remote server.</p>
  
  <pre><code>rsync -avzhe ssh --progress /root/BP/temp/temp.txt root@host2:/root/BP/temp2
  </code></pre>
  
  <p>Where <code>/root/BP/temp/temp.txt</code> is available in local but <code>/root/BP/temp2</code> this path is not peresent in remote server.</p>
  
  <p>I am getting below error :</p>
  
  <pre><code>rsync: change_dir#3 "/root/BP" failed: No such file or directory (2)
  rsync error: errors selecting input/output files, dirs (code 3) at main.c(625) [Receiver=3.0.9]
  rsync: connection unexpectedly closed (9 bytes received so far) [sender]
  rsync error: error in rsync protocol data stream (code 12) at io.c(605) [sender=3.0.9]
  </code></pre>