title: CMD file copy from Java
body: <p>I am looking to open up a command prompt and pass in a copy command, some switches, and the source file plus destination. I've tried the code below but nothing appears to be happening. What am I not seeing? What could I be doing wrong?</p>
  
  <pre><code>String line;
  
  line = "cmd COPY /Y C:\srcfolder\112.bin C:\destfolder";
  
  Process p = Runtime.getRuntime().exec(line);
  
  p.waitFor();
  </code></pre>