title: Measure time for opening a large file using windows batch file
body: <p>I would like to open few large files (word, excel, power-point etc) using a Windows batch file and I would like to record if the operation passed or failed. If it passed I would like to write to the log.  All that I have done is below, however, I am unable to measure the time it is taking for opening the files. I tried few scripts but they all failed.</p>
  
  <p>please can you help me</p>
  
  <pre><code>echo StartTime = %Time% &gt;&gt; C:\Users\abc\Desktop\time.log
  start winword.exe &amp;&amp; (
  echo Pass: MS Word opened at: %date% %time% &gt;&gt; C:\Users\abc\Desktop\time.log
  ) || (
  echo Fail: MS Word Errored at: %date% %time% &gt;&gt; C:\Users\abc\Desktop\time.log
  )
  echo EndTime = %Time% &gt;&gt; C:\Users\abc\Desktop\time.log
  
  
  echo StartTime = %Time% &gt;&gt; C:\Users\abc\Desktop\time.log
  start excel.exe &amp;&amp; (
  echo Pass: MS Excel opened at: %date% %time% &gt;&gt; C:\Users\abc\Desktop\time.log
  ) || (
  echo Fail: MS Excel Errored at: %date% %time% &gt;&gt; C:\Users\abc\Desktop\time.log
  )
  echo EndTime = %Time% &gt;&gt; C:\Users\abc\Desktop\time.log
  </code></pre>