I am trying to find and use a specific word as a variable to print into a txt file using a batch script.
So this is an example of the text.
10-03-2021 18:46:12:77 INFO: [SET_APP_VARS] Country:UK
10-03-2021 18:46:12:78 INFO: [SET_APP_VARS] Langauge:ENGLISH
10-03-2021 18:46:12:78 INFO: [SET_APP_VARS] Type:CLASSIC
10-03-2021 18:46:12:78 INFO: [SET_APP_VARS] Lane:801
So I need to find the word CLASSIC and use it as a variable
Is the below code correct.
FOR /F "skip=2 tokens=1,2,3,4,5,6 delims=:" %%a IN (test.txt) do echo Country is "%%f" & goto next
:next
FOR /F "skip=4 tokens=1,2,3,4,5,6 delims=:" %%a IN (test.txt) do echo Motherboard is is "%%f" & goto done
:done