ping resultados exportados para .csv para várias linhas e colunas

0

Eu tenho um script que corro para pingar vários endereços IP. Funciona muito bem com tudo o que eu tenho do jeito que eu quero. O problema é a exportação. Eu preciso de "Roteador" para iniciar na coluna "A" linha 2 e eu preciso do "x.x.x.x é UP" para iniciar na coluna B linha 2.

script abaixo.

...

echo off
color a
cls
@echo Welcome to the Ping Scan CheckList Script v3
echo.
@echo This script is going to expect three octets, and test the fourth.
@echo You can break the store i.p. into 4 octets. I.E. 10.x.yy.zz where x and yy equal the store number.
@echo Please begin entering the first three now.
echo.
SET/p first=First Octet:
SET/p second=Second Octet:
SET/p third=Third Octet:
set dat=%USERPROFILE%\DESKTOP\%second%%third%-%USERNAME%-%DATE:~4,2%%DATE:~7,2%%DATE:~10,4%.csv
@echo !!!!! %DATE% %TIME% !!!!!,IP >>%USERPROFILE%\DESKTOP\%second%%third%-%USERNAME%-%DATE:~4,2%%DATE:~7,2%%DATE:~10,4%.csv
echo "Router">>%dat%
echo "Router">>%dat%
echo "Router">>%dat%
echo "Router">>%dat%
echo "Router">>%dat%
SET t=0
:start
SET /a t=t+1
echo Pinging .%t%
ping -w 200 %first%.%second%.%third%.%t% > nul
if %errorlevel%==0 echo "",%first%.%second%.%third%.%t% is UP!>>%dat%
if %errorlevel%==1 echo "",****%first%.%second%.%third%.%t%**** is DOWN!>>%dat%

IF %t%==217 GoTo finish
Goto start
:finish
@echo The script is done, you can find the full log on your desktop
pause
    
por smarkcum 23.06.2016 / 15:00

0 respostas