Code: Select all
for /f "usebackq tokens=1,2* delims= " %%i in (`type COUNTER.txt`) do set COUNTERrc3=%%i
against file COUNTER.txt which contains:
0x0000020A 0586 6.1 2 ????##
where '????' is 0A020000h and '##' is 0D0Ah (CRLF)
the FOR fails to parse the 1st field correctly and does this:
set COUNTERrc3=0x0000020A
set COUNTERrc3="un-printable character"
which causes all sorts of problems. In my case, I had to set
a special ERRORLEVEL in my MASM program if a 0Ah is in any of
the 4 bytes in the ???? field that is in binary format, in order
to bypass running this FOR command in its' .bat.
Is this a FOR restriction? I first tried adding a 0Ah in the "delims= "
field after the space, but the FOR then failed syntax checking.
Comments?