network script / .batch file creation help

SYN ACK

[H]ard|Gawd
Joined
Jul 11, 2004
Messages
1,243
looking to speed things up a little, but it's been so long since i've created batch scripts i'm at a loss.

1)
create a batch script t.bat so i can type
t <ip address>
to tracert instead of having to type tracert every time.


2)
sites with backup links; sometimes they'll flip over to vpn backup without notice.
i'd like to create a batch file to run that will tracert a group of IPs and output / open in notepad so i can quickly view them all to see which ones are not running over the primary link / route.

thanks in advance,
 
1. use doskey. so doskey t=tracert

2. in a bat file

tracert x.x.x.x > output.txt
tracert y.y.y.y >> output.txt
tracert z.z.z.z >> output.txt
 
t.bat
Code:
tracert %1

checkroutes.bat
Code:
tracert your.hostorip.com >> logoutput.txt  #  Use just '>' to create a new file, '>>' appends or creates a new file
tracert your1.hostorip.com >> logoutput.txt
tracert your2.hostorip.com >> logoutput.txt
notepad logoutput.txt
 
yep, wicked thanks :)

any other ideas like this you guys use to speed things up?
 
I love batch files. I wrote one yesterday to generate 360 config files using two FOR loops and about 15 lines of code. I can't find the file now unfortunately :(

It was a one-time use thing anyway. I could rebuild it in about 15 minutes.
 
Back
Top