title: Printing current date and time in DOS script
body: <p>I have a script that prints the date and time followed by a string in a log.</p>
  
  <pre><code>echo %DATE%_%TIME% Processing %%f &gt;&gt; process.log
  </code></pre>
  
  <p>The problem is that the date and time is always the date and time when the script is started. I've been running the script overnight, and still has the same date and time. Is there a way to update them so it shows the current date and time when the string is printed to the log file?</p>