title: Open, wait, save, close, and copy a file using Windows batch file commands
body: <p>With my <code>.bat</code> I would like to:</p>
  <ul>
  <li>open the xlsx file,</li>
  <li>waiting 2 min,</li>
  <li>close the file with save options</li>
  <li>copy this file to another folder.</li>
  </ul>
  <p>For now I can copy and paste the file, but I don't know how to open it, with a <a href="/questions/tagged/cmd" class="post-tag" title="show questions tagged &#39;cmd&#39;" rel="tag">cmd</a> function, and save it.</p>
  <p>Thank you for your help.</p>
  <p>My code is :</p>
  <pre><code>@echo off
  cmd &quot;O:\XXXX\*.*&quot;
  xcopy/y &quot;O:\XXXX\*.*&quot; &quot;O:\XXX\&quot; 
  pause
  </code></pre>