title: Count frequencies string repeat batch file
body: <p>Source file, <code>A.txt</code></p>
  
  <pre><code>7895537000011
  7895537000028
  7895537000035
  7895537000042
  7895537000059
  7895537000066
  7895537000011
  7895537000011
  7895537000028
  7895537000028
  7895537000028
  7895537000059
  7895537000059
  </code></pre>
  
  <p>Archive destination, <code>B.txt</code> <em>(I need a batch that gives me this result)</em></p>
  
  <pre><code>7895537000011,3
  7895537000028,4
  7895537000035,1
  7895537000042,1
  7895537000059,3
  7895537000066,1
  </code></pre>
  
  <p> </p>
  
  <pre><code>setLocal EnableDelayedExpansion
  for /f "tokens=* delims= " %%a in (Inventario_%loja%_%dia%-%mes%-%ano%_%hour%h%min%m%secs%s.inv) do (
      echo %%a,1 &gt;&gt;C:\Inventario\Inventario_%loja%_%dia%-%mes%-%ano%_%hour%h%min%m%secs%s\Inventario_%loja%_%dia%-%mes%-%ano%_%hour%h%min%m%secs%s.log
  )
  </code></pre>
  
  <p>I tried editing the above script but it did not work very well, I do not know where to start.</p>