Code: Select all
"VarName" "TimeString" "VarValue" "Validity" "Time_ms"
"VALUES_A" "2021-10-25 09:57:32" 10500 1 44494414962.465279
"VALUES_B" "2021-10-25 09:57:32" 59.282589 1 44494414962.488426
"VALUES_C" "2021-10-25 09:57:32" 7.522789 1 44494414962.488426
"VALUES_D" "2021-10-25 09:57:32" 7.880400 1 44494414962.500000
"VALUES_E" "2021-10-25 09:57:32" 8.337399 1 44494414962.500000
"VALUES_F" "2021-10-25 09:57:32" 9.523390 1 44494414962.534721
"VALUES_G" "2021-10-25 09:57:32" 16.065742 1 44494414962.534721
"VALUES_H" "2021-10-25 09:57:32" 18.799999 1 44494414962.546295
"VALUES_I" "2021-10-25 09:57:32" "2013-03-14 21:30:32" 1 44494414962.546295
"VALUES_A" "2021-10-25 09:57:52" 10501 1 44494414962.465279
"VALUES_B" "2021-10-25 09:57:52" 60.282589 1 44494414962.488426
"VALUES_C" "2021-10-25 09:57:52" 7.622789 1 44494414962.488426
"VALUES_D" "2021-10-25 09:57:52" 7.890400 1 44494414962.500000
"VALUES_E" "2021-10-25 09:57:52" 7.337399 1 44494414962.500000
"VALUES_F" "2021-10-25 09:57:52" 10.523390 1 44494414962.534721
"VALUES_G" "2021-10-25 09:57:52" 17.065742 1 44494414962.534721
"VALUES_H" "2021-10-25 09:57:52" 19.799999 1 44494414962.546295
"VALUES_I" "2021-10-25 09:57:52" "2013-03-14 21:30:32" 1 44494414962.546295
Code: Select all
2021-10-25 09:57:32, 10500, 59.282589, 7.522789, 7.880400, 8.337399, 9.523390, 16.065742, 18.799999
2021-10-25 09:57:32, 10501, 60.282589, 7.622789, 7.890400, 7.337399, 10.523390, 17.065742, 19.799999
Code: Select all
@echo off
setlocal enableDelayedExpansion
for %%F in (*.txt) do (
set "out="
set "i=x"
> "%%~nF.csv" (
for /f usebackq^ tokens1^= delims^="*"^ "*"^ %%A in ("%%F") do (
if %%A neq !i! (
if defined out echo !out!"
set /a "i=%%A, j=0"
set "out=!i!
) else (
set /a j+=1
if !j! leq 3 (set "out=!out!.%%B j") else set "out=!out!.%%C"
)
)
if defined out echo !out!"
)
)
AND I know ther's pleny of script people here
Arne Kjetil