In the textfile "testskip.txt", I have to find the linenumber of the first line with "Platform ID:\t1", from that specific line the first linenumber with "Name ID:\t\t6" and from that specific line the first linenumber with "Offset:\t\t3". I wrote these lines of code:
The first FOR /F works great, but the second and third FOR /F not.
Even if I add the real linenumbers in "skip=", the code doesn't work.
I spend hours looking on the internet for solutions, I tried all kind of suggestions, but nothing works. I can't find the solution.
Code:
@ECHO OFF
for /f %%i in ('ffind /F /L /K /M /E"Platform ID:\t1" TEST2.TXT') do @set PlatformID1LineNumber=%@STRIP[[],%%i]
echo (_1) PlatformID1LineNumber.: %PlatformID1LineNumber
for /f "skip=%%PlatformID1LineNumber%" %%i in ('ffind /F /L /K /M /E"Name ID:\t\t6" TEST2.TXT') do @set NameID6LineNumber=%@STRIP[[],%%i]
echo (_2) NameID6LineNumber.....: %NameID6LineNumber
for /f "skip=%%NameID6LineNumber%" %%i in ('ffind /F /L /K /M /E"Offset:\t\t3" TEST2.TXT') do @set OffsetLineNumber=%@STRIP[[],%%i]
echo (_3) OffsetLineNumber......: %OffsetLineNumber
The first FOR /F works great, but the second and third FOR /F not.
Even if I add the real linenumbers in "skip=", the code doesn't work.
I spend hours looking on the internet for solutions, I tried all kind of suggestions, but nothing works. I can't find the solution.