hope you guys can help. i am looking for a batch file to merge all CSV files in a specific folder with an End of Line "LF".
The script below creates an output file with "CRLF" EOL, however my automatic data loader only accepts "LF" EOL.
Also i would like to have one header in the output file.
help would be much appreciated as i have wasted enough time finding a solution.
this is what i tried below.
@ECHO OFF
SET first=y
SET newfile=new.csv
for %%F in (*.csv) do IF NOT %%F==%newfile% (
if defined first (
COPY /y "%%F" %newfile% >nul
set "first="
) else (
FOR /f "skip=1delims=" %%i IN (%%F) DO >> %newfile% ECHO %%i
)
)