thanks Saso,
i try to do it in my way:
for /f "tokens=1,2,3,4,5,6,7* usebackq delims=," %%a in ("C:\polaris\test\file.txt") do echo %%a,3100,2,%%f,0;>>C:\polaris\test\file2.txt
but i had a ; at the end
but your solution is better (there is no ; at the end)
Search found 3 matches
- 19 Nov 2022 13:42
- Forum: DOS Batch Forum
- Topic: rewrite a txt file
- Replies: 4
- Views: 3423
- 19 Nov 2022 11:23
- Forum: DOS Batch Forum
- Topic: rewrite a txt file
- Replies: 4
- Views: 3423
Re: rewrite a txt file
i resolve the problem... but i need last help!!!! here the script: @echo cd C:\polaris\test ren *.csv file.txt set "txt=C:\polaris\test\file.txt" more +2 "%txt%" >"%txt%.new" move /y "%txt%.new" "%txt%" >nul for /f "tokens=1,2,3,4,5,6,7* usebackq delims=," %%a in ("C:\polaris\test\file.txt") do echo...
- 19 Nov 2022 05:47
- Forum: DOS Batch Forum
- Topic: rewrite a txt file
- Replies: 4
- Views: 3423
rewrite a txt file
hi to all, i need help rewriting a test file in a specific way. as i am an amateur, i need your help. the starting file is file.txt like this: 2022-11-19 10:06:01,0,17.14,68.27,12.9,8.8556,10.5928 first part is date/time and is ok 0 is a fixed value in second position that i need to change in a new ...