I'm trying to persistantly ping a destination, say google.co.uk, to determine how reliable the internet is at one of my locations. I am running this ping test for about a month in order to get a good grasp of whether the internet between 6am and 10am, and 4pm and 7pm, is going to suit transferring live audio over it at the busiest times for internet traffic in the day.
I'm getting an annoying logfile...:
With my code in the bat file:
FOR /f "tokens=1-8 delims=:./ " %%G IN ("%date%_%time%") DO (SET datetime=%%G%%H%%I_%%J_%%K)
ping google.co.uk -t |find /v ""|cmd /q /v:on /c "for /l %%a in (0) do (set "data="&set /p "data="&if defined data echo(!time! !data!)" >> D:\filename_%time:~0,2%%time:~3,2%-%date:~-10,2%%date:~3,2%%date:~-4,4%.txt'
It's producing:
18:23:07.24 Reply from 216.58.198.227: bytes=32 time 18:23:07.24 =12ms TTL=54 18:23:08.24 Reply from 216.58.198.227: bytes=32 time 18:23:08.24 =12ms TTL=54 18:23:09.24 Reply from 216.58.198.227: bytes=32 time 18:23:09.24 =12ms TTL=54
Where the one result is split over two lines... What am I doing wrong? And is there a solution?
Thanks in advance.