echo %date% >> C:\Users\Temp\date.txt echo %time% >> C:\Users\Temp\time.txt start C:\Windows\notepad.exe ping -n 16 localhost > null set /p time=