Save the below script to a text file, amend the domain or ip you wish to ping and save as a .bat file. For example ping.bat
Open a command prompt and drop the ping.bat file into the command prompt and press enter.
The script will run and save output to c:\pingtest.txt
@Echo off
:TOP
echo %time% >> “C:\pingtest.txt”
Ping www.domainname.co.uk >> “C:\pingtest.txt”
GOTO TOP