I am working on a script, in which I am saving ping output with timestamp of my servers to a text file.
I am using the following command
Code: Select all
IP = 10.0.0.2
Formattime, logtime, %A_Now%, yyyy-MM-dd_HH
Ext = | cmd /q /v /c "(pause&pause)>nul & for /l `%a in() do(set /p `"data=`" && echo(!date! !time! !data!)&ping -n 2 localhost>null"
Run,%comspec% /c ping %IP% -t %Ext% >> "%IP%_%logtime%.log"
I just want to create new log for every hour or every 10 mb.?
Suggest a way to achieve.
Thanks in advance
SDK.