Advertisement
Guest User

Untitled

a guest
May 4th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. @echo off
  2.  
  3. :START
  4.  
  5. set YYYY=%DATE:~-4%
  6. set MM=%DATE:~3,2%
  7. set DD=%DATE:~0,2%
  8.  
  9. set HH=%TIME: =0%
  10. set HH=%HH:~0,2%
  11. set MI=%TIME:~3,2%
  12. set SS=%TIME:~6,2%
  13. set FF=%TIME:~9,2%
  14.  
  15. ping -n 1 www.orange.fr > nul -w 1000
  16.  
  17. if %errorlevel% == 1 (
  18. echo %DD%/%MM%/%YYYY% %HH%:%MI%:%SS%::%FF% Internet down >> D:\Internet.txt
  19. )
  20.  
  21. REM Timeout /t 30
  22. @set errorlevel = 0
  23.  
  24. GOTO START
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement