Add timestamp to log lines from batch output
<p>I have a simple batch file that is scheduled to run, and essentially just backs up a remote network share to my computer.</p>

<pre><code>@ECHO OFF
xcopy \\10.8.0.1\share\ E:\backup\ /c /s /r /d /y /i &gt;&gt; E:\backup\backup.log
</code></pre>

<p>The output in the log looks like this:</p>

<pre><code>\\10.8.0.1\share\test.txt
1 File(s) copied
\\10.8.0.1\share\New Microsoft Word Document.docx
1 File(s) copied
</code></pre>

<p>Basically I just want to add a date and time stamp to each log entry. How do I go about doing this?</p>