@echo off REM list.text is a list of \\computernames, one per line for /f %%a in (list.txt) do call :DOIT %%a echo done goto :eof :DOIT setlocal :REM no errorchecking for the case where systeminfo cannot connect to the remote system for /f "tokens=4,5" %%a in ('"systeminfo /S %1 |findstr /i /C:"total physical""') do set curr=%%a %%b Echo %1 - %curr% >>c:\output.txt endlocal goto :eof