how do i find a string and then goto if found?
i mean i know how but it fails not sure why.
FINDSTR /C:”TEST” “%CD%\something.txt” || goto start
:start
{code}
but it fails.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Or like this:
@echo off
set string=TEST
REM When containing whitespaces, surround full path with double-quotes:
set file=%CD%\something.txt
FINDSTR /C:”%string%” %file%
if errorlevel 1 echo Did NOT find “%string%” in %file% & goto :EOF
echo Found “%string%” in %file%