for /f "delims=" %%a in (build.xml) do set lastLine="%%a"
if %lastLine%=="Everything is Ok" echo YEAH!
@echo off
findstr "Everything is Ok" d:/test.txt >null
if errorlevel 1 GOTO EXIT
:COMMAND
echo
echo "Whoooohoo!"
:EXIT
exit 0
@echo off
for /F %%I in ('"find /n /i "everything is ok" file.txt | cut -f 1 -d ] | cut -f 2 -d ["') do SET Number=%%I 2>nul
For /F "Tokens=3" %%A In ('Find /V /C "" file.txt') Do Set sCount=%%A
If %sCount% GEQ %Number% Echo whoohoo