title: "for /f .... do" doesn't work on the first line
body: <p>I use the following batch file to delete files with full path. The first line of the output file is an error message &quot;The filename, directory name, or volume label syntax is incorrect.&quot; All files in C:\DELETE-ALL-FULLPATH.txt are deleted except the first one. I wonder why the first line causes the problem.</p>
  <pre><code>@REM This script deletes files which include full path.
  
  @if exist C:\DELETE-all-fullpath-output.txt DEL /Q c:\DELETE-all-fullpath-output.txt
  @for /f &quot;tokens=* eol=@ delims=&quot; %%A in ( C:\DELETE-ALL-FULLPATH.txt) do (
  @DEL /Q /A &quot;%%A&quot;
  )   &gt;&gt; C:\DELETE-all-fullpath-output.txt 2&gt;&amp;1
  
  CD /D C:\
  </code></pre>
  <p>These are the first two lines of C:\DELETE-ALL-FULLPATH.txt. All lines have the same format except the numbers are different. All the listed files are deleted except the first one.</p>
  <pre><code>c:\Users\administrator\documents\IMG_20190229_134600.jpg
  c:\Users\administrator\documents\IMG_20191229_134202.jpg
  ......
  </code></pre>
  <p><a href="https://i.stack.imgur.com/p13n0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p13n0.png" alt="enter image description here" /></a></p>