I am trying to find a list of machines in files in folders, and print out the last line of the output only.
@echo off for /f %%a in (computers.txt) do findstr /x
setLocal enableDelayedExpansion for /f %%a in (computers.txt) do for /f "tokens=*" %%A in ('findstr /xs "%%a"') do set lastFound=%%A echo !lastFound!