Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
@ECHO OFF CLS FOR /L %%a in (1,1,5) DO ( CALL :GetDateTime ECHO %TheDate% %TheTime% PING 10.0.0.0 -n 1 -w 1000 >NUL 2>&1 ) EXIT /b :GetDateTime FOR /F "tokens=1-6" %%A IN ('WMIC Path Win32_LocalTime Get Year^,Month^,Day^,Hour^,Minute^,Second ^| FINDSTR /R ') do ( IF %%A GEQ 10 (set dd=%%A) ELSE (set dd=0%%A) IF %%B GEQ 10 (set hh=%%B) ELSE (set hh=0%%B) IF %%C GEQ 10 (set min=%%C) ELSE (set min=0%%C) IF %%D GEQ 10 (set mm=%%D) ELSE (set mm=0%%D) IF %%E GEQ 10 (set ss=%%E) ELSE (set ss=0%%E) IF %%F GEQ 10 (set yy=%%F) ELSE (set yy=0%%F) ) SET TheDate=%yy%-%mm%-%dd% SET TheTime=%hh%.%min%.%ss% EXIT /b
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Copy 20 files at a time from drive G to drive H||10||66|
|WordPress: Debugging from my Windows 10 Desktop||6||62|
|if then inside for loop not working - Batch scripting||8||28|
|Crashing when deleting value with no child in Binary Tree||4||28|