@echo off
set nbPing=30
set numLineDelete=8
set /A moveLine= %nbPing%+%numLineDelete%

:deb
del "c:\temp\ping192.txt"
ping 8.8.8.8 -t -n %nbPing% >"c:\temp\ping192.txt"
	for /F "tokens=1" %%i in ('date /t') do set mydate=%%i
	for /F "tokens=1" %%i in ('time /t') do set mytime=%%i
	echo Pingtime = %mytime% , %mydate%>>"c:\temp\ping192.txt"
	set "mytime="
	set "mydate="

timeout %nbPing%	

for /L %%G IN (1,1,800) DO (
	ping 8.8.8.8 -t -n %nbPing% >>"c:\temp\ping192.txt"
	call :timestamp
	timeout %nbPing%
	more +%moveLine% "c:\temp\ping192.txt" > "c:\temp\ping192.txt2"
	move /y "c:\temp\ping192.txt2" "c:\temp\ping192.txt"
	)

goto :deb

:timestamp
	for /F "tokens=1" %%i in ('date /t') do (set mydate=%%i)
	for /F "tokens=1" %%i in ('time /t') do (set mytime=%%i)
	echo Pingtime = %mytime% , %mydate%>>"c:\temp\ping192.txt"
goto :eof




:end


