title: DOS Batch : remove characters from string in a FOR loop
body: <p>I have a TXT file that contains :</p>
  
  <pre><code>C086002-B3116
  C086014-T1234  
  C086014-T1325
  C086014-T1375" 
  C086014-T1374"  
  </code></pre>
  
  <p>These strings include both trailing whitespaces and double quotes.</p>
  
  <p>I want to remove these using a FOR loop :</p>
  
  <pre><code>for /f %%a in (file.txt) do (
      set str=%%a
      set str=%str: =%
      set str=%str:"=%
  )
  </code></pre>
  
  <p>The Shell windows is opening and closing down immediately and nothing is done on the strings... Thanks for your help on this operation.</p>