I have csv file that I need to take the one line it creates and add it to a master csv file that is later imported into a DB.
What I have now works but for one problem. If the data has a space in it the field gets split into two columns.
example:
dog,cat,mouse,big dog,fish
ends up like
dog,cat,mouse,big,dog,fish
Where "big dog" should be one column.
Batch File:
ECHO Testing Battery
Start /wait battinfo.exe --unattended
ECHO Reading Results
for /f "skip=1 delims=, tokens=1-8" %%a in (battinfo.csv) do call :WriteCVS %%a %%b %%c %%d %%e %%f %%g %%h
GOTO Done
:WriteCVS
ECHO Append DB
ECHO %1,%2 %3,%4,%5,%6,%7,%8,%COMPUTE
RNAME%,%US
ERNAME%>>R
ecall.csv
GOTO EOF
:Done
ECHO Clean Up
ECHO.>battinfo.csv
:EOF
Start Free Trial