I have a textfile with several different rows. I want to get the number of the row which start with CellNumber e.g.
file.txt
Hello there
my name is struct
CellNumber 4.0050
I am from Timbuktu
How can I store the number 4.005 in a variable?
This is my try:
for /F "tokens=*" %%A in (file.txt) do (
echo %%A
IF "%%A:~0,10%"=="CellNumber" (
set var=%var:~-5%
)
)
echo result: %var