I am trying to merge multiple csv files while deleting the 2 first rows of each file. I came up with something like this:
@echo off
(for %%f in (*.csv) do more +2 "%%f") >> output.csv
echo Done.
There are 12 files of 26Mo (253 612 rows in each file). But the process stops at row 65 534, making a 6Mo file.
I think this is the fastest way to do that in a Batch file:
@echo off
(for %%f in (*.csv) do (
< "%%f" (
set /P "=" & set /P "="
findstr "^"
)
)) > output.tmp
ren output.tmp output.csv
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.