title: CSV processing - strip some chars and combine files
body: <p>I have several dozen CSV files in a folder. I need to:</p>
  
  <ol>
  <li>Strip out null characters (\x00)</li>
  <li>Make sure there is only one CRLF at the end (sometimes there are 0, 1 or more)</li>
  <li>Combine all the files into one file. Each file has a header, but only want one header for the combined file.</li>
  <li>[Optional: Newer csv's have an additional column. Possible to add new column (w blanks) for older files?]</li>
  </ol>
  
  <p>Have this so far for combining and keeping only one header:</p>
  
  <pre><code>@echo off
  setlocal
  set first=1
  set fileName="combined.csv"
  &gt;%fileName% (
    for %%F in (*.csv) do (
      if not "%%F"==%fileName% (
        if defined first (
          type "%%F"
          set "first="
        ) else more +1 "%%F"
      )
    )
  )
  </code></pre>
  
  <p>Not sure how to replace / strip characters though. </p>