Why does this:
for /f "tokens=5 delims=<>" %%G in ('findstr /C:"<a href=\"register\">" "index.html"') do echo %%G
give an errorlevel 1 while this
findstr /C:"<a href=\"register\">" "index.html"
gives an errorlevel 0?
The first code gives me the string I'm looking for. The second one gives the line of text where the string is in. I need the first code to give me an errorlevel 0 because it returned no errors as far as I know. What am I doing wrong?