I am trying to remove the first and the last row of CSV files in a folder and after that merge them to make one csv file.
I am trying to remove the first and last row with the batch script below but its not working:
@echo on
setlocal enabledelayedexpansion
for %%a in (*.csv) do (
find /v "RemoveThis" < %%a >> %%~Na.csv
)
Anyone has done similar batch script before. Can someone help me with this one.
The CSV will look like this.
0 RemoveThis
1 6105829 4 541746546 46542114546 56541651651 132 132 1 31/12/2017 20:43 31/12/2017 20:45
1 6105837 4 4545 6546 4465465 396 396 1 31/12/2017 18:20 31/12/2017 18:26
1 6105844 4 21656565 46546546 4654466546 36 36 1 31/12/2017 19:27 31/12/2017 19:27
1 6105845 4 45454 45454 465465 2 2 1 31/12/2017 19:26 31/12/2017 19:26
99 RemoveThis 188