title: Writing a batch file that runs robocopy from user input
body: <p>How can I write a batch file that runs cmd.exe, enters the partial command <code>robocopy</code> then waits for user input to complete and execute the robocopy command? It seems like it should be the simplest thing to do but no method I've tried enters the command in such a way as to hold and wait for user input and then successfully execute the completed robocopy command</p>
  
  <p>For example:</p>
  
  
  
  <pre class="lang-bat prettyprint-override"><code>@echo off
  set var="robocopy "
  cmd.exe %var%
  </code></pre>
  
  <p>appears to work but then, for example, user-inputting /? to bring up robocopy's info instead brings up <code>cmd.exe</code>'s info</p>
  
  <p>Another example:</p>
  
  <pre class="lang-bat prettyprint-override"><code>@echo off
  cmd /k robocopy
  </code></pre>
  
  <p>Runs <code>robocopy</code> with no destination/source folders or switches, then closes <code>robocopy</code> and waits for a new user-inputted command.</p>
  
  <p>what I'm trying to do is have a batch file that when I click it a cmd window will open with the partial command <code>robocopy</code> already entered ready for me to complete the command with source/destination/switches and execute it with an enter key press - I use <code>robocopy</code> all day long so this would be a big time saver.</p>