I need to create a Windows batch file that generates a .csv file with three fields for all the files in a directory (minus the batch file itself!).
Fields:
try this:
@ECHO OFF &SETLOCAL (FOR /f "delims=" %%a IN ('dir /b /a-d') DO ( FOR /f "tokens=1-3*" %%x IN ('dir /a-d /tc "%%~a"^|findstr "^[0-9]"') DO ( ECHO "%%a",%%~ta,%%x %%y %%z ) ))>DIR.csv TYPE DIR.csv