I have a large csv file (8GB) called input.csv, I am in need to create a bat file to export every 4th lines of the csv file. The filtered file will be called output.csv.
How do I edit the below script to perform the task?
::====== script starts here ===============
:: split csv lines begin with O
:: Osplit.bat 2013-06-27 14:55:59.31
@echo off & setLocal enableDELAYedeXpansioN
@echo off > A.csv & @echo off > B.csv
for /f "tokens=* delims= " %%a in (my.csv) do (
if !S! equ O (
>> A.csv echo.%%a
) else (
>> B.csv echo.%%a
::====== script ends here =================