<p><strong>tl;dr:</strong> <code>REM</code> is the documented and supported way to embed comments in batch files.</p>
<p><code>::</code> is essentially a blank label that can never be jumped to, whereas <code>REM</code> is an actual command that just does nothing. In neither case (at least on Windows 7) does the presence of redirection operators cause a problem.</p>
<p>However, <code>::</code> is known to misbehave in blocks under certain circumstances, being parsed not as a label but as some sort of drive letter. I’m a little fuzzy on where exactly but that alone is enough to make me use <code>REM</code> exclusively. It’s the documented and supported way to embed comments in batch files whereas <code>::</code> is merely an artifact of a particular implementation.</p>
<p>Here is an example where <code>::</code> produces a problem in a <code>FOR</code> loop.</p>
<p>This example will <em>not</em> work in a file called <code>test.bat</code> on your desktop:</p>
<pre><code class="lang-auto">@echo off
for /F "delims=" %%A in ('type C:\Users\%username%\Desktop\test.bat') do (
::echo hello>C:\Users\%username%\Desktop\text.txt
)
pause
</code></pre>
<p>While this example will work as a comment correctly:</p>
<pre><code class="lang-auto">@echo off
for /F "delims=" %%A in ('type C:\Users\%username%\Desktop\test.bat') do (
REM echo hello>C:\Users\%username%\Desktop\text.txt
)
pause
</code></pre>
<p>The problem appears to be when trying to redirect output into a file. My best guess is that it is interpreting <code>::</code> as an escaped label called <code>:echo</code>.</p>