@echo off set lstfile=%1 echo. echo. echo | set /p="Checking %lstfile%: " set rslt="0" for /f %%i in ('findstr /NI /C:"but not in" /C:"Duplicate Observations found" /rc:"Observations Unequal: [1-9]*\." /rc:"Variables Unequal: [1-9]*\." /C:"Common Variables with Conflicting Types" %lstfile%') do set rslt=%%i if %rslt% == "0" ( echo PASS ) else ( echo FAILED****** ) echo. REM findstr /NI /C:"but not in" /C:"Duplicate Observations found" /rc:"Observations Unequal: [1-9]*\." /rc:"Variables Unequal: [1-9]*\." %lstfile% REM echo rslt is %rslt%