Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo off
- cls
- color 1F
- title Continuous Traceroute (with timestamped logging)
- echo.
- echo The results will be logged as a .txt file on your desktop.
- echo If you get any errors, run this script as administrator.
- echo.
- echo Please enter the desired name of the tracert log file.
- echo Do not include spaces or odd characters.
- echo Don't include .txt extension; it will be added automatically.
- set /p FILE=Filename:
- echo Results: > %UserProfile%\Desktop\%FILE%.txt
- echo.
- set /p IP=Enter name or IP address to trace route to:
- echo.
- cls
- echo Now logging results to %UserProfile%\Desktop\%FILE%.txt
- echo Close this window when you want to stop.
- echo If this window turns red at any point, it indicates an error or timeout.
- :start
- time /t
- echo.
- echo Tracing route to %IP%...
- echo.
- echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> %UserProfile%\Desktop\%FILE%.txt
- echo The current time is: >> %UserProfile%\Desktop\%FILE%.txt
- time /t >> %UserProfile%\Desktop\%FILE%.txt
- Tracert %IP% >> %UserProfile%\Desktop\%FILE%.txt
- if errorlevel ==1 (
- color cf
- echo Error or timeout detected!
- echo Check %UserProfile%\Desktop\%FILE%.txt for details.)
- goto start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement