title: Is there a way to loop through a files contents and use it in batch?
body: <p>I'm working on a project in batch-file and need to loop through the contents of a file and print out the contents.</p>
  <p>I have a set up a <code>for /f</code> loop to go through the contents of the file, but it isn't working.</p>
  <p><strong>The Code</strong></p>
  <pre><code>cd C:\Users\(my name was here)
  for /f %%G in (List.txt) (
      del /F /S %%G
      echo %errorlevel%
      pause
  )
  </code></pre>
  <p>I have been Googling for about an hour now, and can't find anything which has worked for me. I was hoping that you guys could tell me what I'm doing wrong with my code.</p>
  <p>If you are going to make an answer, please include an explanation of the code so I will understand what I'm doing wrong.</p>