REM +The text file with your list of hostnames should be named hostlist.txt REM +The hostnames can be seperated by a comma or carriage return REM +The output file will be a CSV file named OSResults.csv REM +The output file is setup to be comma delimited for easy import to Excel @ECHO OFF COLOR 2F REM Delete the output file if it exists from a previous run. IF EXIST "PingResults.txt" del /q PingResults.txt IF EXIST "OSResults.csv" del /q OSResults.csv REM Delete the temp file. IF EXIST "pinglog" del /q pinglog REM Description Header for top row in Excel ECHO Hostname,Operating System > OSResults.csv REM Pull hostnames from text file until the end of the text file list for /f "tokens=* delims=," %%I in (Hostlist.txt) do call :sub1 %%I goto :eof :sub1 REM Display in the command window which hostname is being processed so we know REM something is happening. ECHO Now Checking NetBackup Client : %1 REM Ping the current hostname set as %1 and redirect the output to pinglog file. "C:\Program Files\Veritas\NetBackup\bin\admincmd\bpgetconfig" -g %1 -L | findstr Release > pinglog set "status=" set /p status=> OSResults.csv echo %*,%status% REM Delete the temp file. IF EXIST "pinglog" del /q pinglog goto :eof COLOR 1a CLS ECHO. ECHO ********************************************* ECHO ********************************************* ECHO ** ** ECHO ** PROCESS COMPLETED! ** ECHO ** ** ECHO ** The Output Filename is PingResults.txt ** ECHO ** ** ECHO ********************************************* ECHO ********************************************* ECHO. ECHO. :END pause exit