echo - Echoing Correct Time in Batch File -


i have problem on computer. time time, features stop working, perhaps 1-5 minutes. ping ceases work when occurs. thought i'd gather stats issue via batch file run ping perhaps 1000 times , echo time when started , again when stopped. file:

echo off set i= /l %%i in (1,1,3) (     echo %time%    ping www.google.com    echo %time% ) 

but happens first time echoed same second time. why? or there better way this?

inside command block (surrounded (parantheses)), need delayed expansion:

@echo off setlocal enabledelayedexpansion /l %%i in (1,1,3) (    echo !time!    ping www.google.com    echo !time! ) 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -