This should work
**names.txt**
host1
host2
host3
**chk1**check.bat**
@echo off
setlocal EnableDelayedExpansion
FORset /F "tokens=* delims="p %%xname=Enter inthe (names.txt)host DOname (
setFINDSTR name=%%x
call/L chk2.bat/C:%name%
**chk2names.bat**txt
@echoIF off
setlocal%ERRORLEVEL% EnableDelayedExpansion
IFEQU /I0 name==%FQDN%echo "found" ELSE echo "match"not found"
pause
The 1st batch file would call the 2nd batch file which performs the check. Unfortunately Batch files don't allow nesting of loops (or even including IF statements inside a FOR loop)