얼마전 ping 테스트 를 며칠 걸어둘일이 있었다..
중간에 이빨나간부분이 언제인지 그게참 궁금했는데 ;
어떻게 하면 방법이 없을까.. 하다가
(choice 가 안된다고 해서..;; )
까먹고 즐겨찾기 정리중에 bat 파일 에 관한 설명글이 있었다..
http://blog.naver.com/kieuns?Redirect=Log&logNo=80018742692
일종의 편법.. 변수를 써서 .. ㅋ
저분글이 도움이 됐다..
어설프지만
타임한번치고 핑테스트하고
좀더 세련되게 만들면 더 좋겠지만.. ;
cmd 커멘드로는 여기까지..
자바로 만들어봐야겠다..
소스..
@echo off
cls
echo ************************
echo * Ping test logging. *
echo ************************
:start
if not '%1'=='' (goto top) else goto end2
:top
echo ※ Ping testing Force close "^C" and type "Y".
echo.
echo 1. Save Ping test
echo 2. Print Ping test
echo 3. Sample
echo 4. End
echo.
set choice=
set /p choice=Type the number to print text :
if '%choice%'=='' goto notchoice
if '%choice%'=='1' goto save
if '%choice%'=='2' goto print
if '%choice%'=='3' goto sample
if '%choice%'=='4' goto end
cls
echo.
echo. "%choice%" is not valid please try again
echo.
set choice=
goto start
:notchoice
cls
echo.
echo. Type number 1, 2, 3.
echo.
goto top
:save
echo.
echo. |TIME >> pingtest_%1.txt
echo. |PING %1 -n 10 >> pingtest_%1.txt
echo.
goto save
:print
echo.
echo. |TIME
echo. |PING %1 -n 10
echo.
goto print
:sample
echo.
echo. |TIME
echo. |PING %1 -n 10
echo.
goto start
:end2
echo Type IP address.
echo ex) pt 168.126.63.1
:end
echo.
echo Thank.
-----------------------
샘플
-----------------------
현재 시간: 10:14:00.06
새로운 시간을 입력하십시오:
Pinging 168.126.63.1 with 32 bytes of data:
Reply from 168.126.63.1: bytes=32 time=2ms TTL=57
Reply from 168.126.63.1: bytes=32 time=2ms TTL=57
Reply from 168.126.63.1: bytes=32 time=1ms TTL=57
Reply from 168.126.63.1: bytes=32 time=1ms TTL=57
Reply from 168.126.63.1: bytes=32 time=1ms TTL=57
Reply from 168.126.63.1: bytes=32 time=1ms TTL=57
Reply from 168.126.63.1: bytes=32 time=1ms TTL=57
Reply from 168.126.63.1: bytes=32 time=1ms TTL=57
Reply from 168.126.63.1: bytes=32 time=1ms TTL=57
Reply from 168.126.63.1: bytes=32 time=1ms TTL=57
Ping statistics for 168.126.63.1:
Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
'유용할까나?' 카테고리의 다른 글
xp에서 bat 파일 choice 사용. (0) | 2008.05.15 |
---|---|
청원군 클레이 사격장 (2) | 2007.10.24 |
WORM_VB.CII 네녀석은 대체 뭐하는 놈이냐!! (2) | 2007.03.15 |
SKT 고객에 한하여 MMS 전용, 비전용폰 모두에서 MMS 수신시 데이터 통화료가 완전 무료화 (2) | 2007.03.07 |
가짜휘발유.. 단골고객에게만.. 친철은 사기치기위한 방법? (1) | 2007.02.21 |
3월부터 집중 단속 대상 목록표 (4) | 2007.02.09 |