Can anyone please suggest me how can I get the value of 9 from the below output.
"Version
"9.0.56336
I know that we need to parse the output and get that value. But, am not succeded to get that.
Thanks In Advance.
Can anyone please suggest me how can I get the value of 9 from the below output.
"Version
"9.0.56336
I know that we need to parse the output and get that value. But, am not succeded to get that.
Thanks In Advance.
@ECHO OFF
SETLOCAL
SET "fine="9.0.56336"
ECHO %fine%
SET "fine=%fine:"=%"
ECHO %fine%
FOR /f "delims=." %%a IN ("%fine%") DO SET "fine=%%a"
ECHO %fine%
GOTO :EOF
Your ...set fine="%%%a" echo fine:%fine%
should be on two separate lines
...set fine="%%a"
echo fine:%fine%
and there should be two, not three %s
This does set fine to the last line (I believe - haven't got the same installation, so I can't test it)
If you indeed have "9.0.56336 as your data content, then the above processing should get the 9.
tokens=1 and it should get the 9set fine="%%a" and set "fine=%%a are vastly different. If %%a contains the string something then the first will set fine to the value "something" whereas the second will set fine to something - the first is quoted, the second, not.