Your code does not work.
yes it does work. Except that I did not provide OP with FULL code. Implementing that flagging system is fairly easy.
I want OP to try himself.
if csv(1) = 0 Then
csv(1) = 1
end if
in fact, there is really no need to do the above, because by changing "new value" in my code to "1", it will still do the same thing...
You also did not assign the the first field to a variable.
if OP has the motivation to learn vbscript, he should be able to do that himself.
Why post code that has not been tested?
its tested .... you just don't see the point i am making...
The OP requested real "Batch code" not incorrect VBScript.
once again, define what is real Batch code, accurately.
Dude, if you are going to provide him your solutions in full , go ahead. Depending on my mood, I am not obliged to solve everything for OP.
If i really want to nitpick about your code, i would do that, but i will not. for example, Input argument checking, input file format ambiguity, eg your code checks for ",0," .... what if the input data is " , 0 ,"
therefore, would you just give it a rest...