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:
@ECHO OFF &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
)
))>DIR.csv
TYPE DIR.csv
But what I need is the File directory and File path as separate records