title: Batch file to list file path and file name in a csv
body: <p>I am trying to make a batch file that lists all files in in a folder and sub directors and exports to a csv with file size, I curently have this:</p>
  
  <pre><code>@ECHO OFF &amp;SETLOCAL
  
  (FOR /f "delims=|" %%a  IN ('dir /s /b  /a-d') DO (
      FOR /f "tokens=1-9*" %%x IN ('dir /b  /a-d /tc  "%%~a"^| C:\Windows\System32\findstr "^[0-9]"') DO (
  
          ECHO %%a, %%z
      )
  ))&gt;DIR.csv
  TYPE DIR.csv
  </code></pre>
  
  <p>But what I need is the File directory and File path as separate records</p>