I need something fairly simple, I just need to ping a list of computers on my text file (printers.txt) with a -a argument to resolve the hostname. then output that to a simple text file, output.txt
I have tried the following but the result was that I had 4k instances of cmd.exe in my processes.
for /f %%a in (printers.txt) do call :ping %%a
echo testing %1
ping %1|find /i "TTL=">nul
if %errorlevel%==0 echo pass&echo %1>>pass.txt
if %errorlevel%==1 echo FAIL&echo %1>>fail.txt
again, I ended up with about 4k instances of cmd.exe and find.exe (a grep instance of some sort).
I'm not real smart but I would like some assistance on this. I just want a very simple ping -a and output to a text or.csv file.