Dear Experts,
How to do this,
if token no 5 in abc.txt is LEQ 25, do echo %%i %%j %%k %%l %%m %%n %%o of abc.txt to output.txt
this is what i have tried
cd\
d:
for /f "tokens=5" %%i in (abc.txt) do set LD=%%i
if %LD% LEQ 25 (echo %%i %%j %%k %%l %%m %%n %%o>> output.txt
) else (
echo Noresult found
)
pause
abc.txt has following record,
abc.tre 0 W131738 qwe 16 2009
sfsdf.sdfsdf 0 W131455 qwe 27 2009
fsdf.rty 0 W7F0BCU182 qwe 30 2009
qw.qwe 2 w4059 qwe 15 2009
wsx.rfv 2 W0132017 qwe 12 2009
xdr.cft 0 W0132017 qwe 11 2009
tgb.ikm 2 W0131738 qwe 31 2009
xdr.cft 0 W0132017 qwe 25 2009
Output.txt should have, (records where the 5th coloumn value is LEQ 25 )
abc.tre 0 W131738 qwe 16 2009
qw.qwe 2 w4059 qwe 15 2009
wsx.rfv 2 W0132017 qwe 12 2009
xdr.cft 0 W0132017 qwe 11 2009
xdr.cft 0 W0132017 qwe 25 2009
but i am getting following result in output.txt
%i %j %k %l %m %n %o
pls advise.