title: Remove Comma on last value of Loop
body: <p>I am creating a list using a file with a for loop. Is there a way of not including a comma on the last value of my loop?</p>
  <p>Here is the code:</p>
  <pre><code>for /F %%a in (test.txt) do (set comma=,&amp; echo %%a !comma!) &gt;&gt; Output.txt
  </code></pre>
  <p>where test.txt contains a list:</p>
  <pre><code>ABC 
  123 
  EG
  </code></pre>
  <p>and i hope to achieve something like this:</p>
  <pre><code>ABC,
  123,
  EG
  </code></pre>