I have a file called test.csv that contains several lines of data. I want to create a bat file that extracts all the data in line 1 into a new text file.
New Text Test.txt
@echo off > newfile & setLocal enableDELAYedeXpansion for /f "tokens=* delims= " %%a in (test.csv) do (
> newfile echo.%%a
goto :eof
)
=====================================
Helping others achieve escape felicityM2
Thanks a for a quick response If I use the sane CSV File test.csv but this time I want to delete the top line of the file.
How would you do this with a BAT file?
@echo off > newfile & setLocal enableDELAYedeXpansion for /f "skip=1 tokens=* delims= " %%a in (test.csv) do (
>> newfile echo.%%a
)
=====================================
Helping others achieve escape felicityM2
Thanks - I want to overwrite the test.csv file once it has deleted the top line
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |