@echo off
set nbPing=28
set numLineDelete=8
set /A moveLine= %nbPing%+%numLineDelete%
set file="c:\temp\ping192.txt"

ping 8.8.8.8 -t -n %nbPing% >>%file%

rem time stamp calculation
	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"
	
rem pause
    timeout %nbPing%

rem clean file and keep last ping
	set /a cnt=0
	for /f %%a in ('type "%file%"^|find "" /v /c') do set /a cnt=%%a
	set /A startLine = %cnt%-%moveLine%
	
	echo %startLine%
	more +%startLine% "c:\temp\ping192.txt" > "c:\temp\ping192.txt2"
	move /y "c:\temp\ping192.txt2" "c:\temp\ping192.txt"

:end


