Piping output to a text file

imported_Phil

Diamond Member
Feb 10, 2001
9,837
0
0
Hi all,

I'm working on a little something right now to work out the average speed of my ADSL line over a defined period. It's going to be very very simple, just .bat files and Windows Scheduler so it runs on regular intervals, but I need to know how to pipe the output from ping to a text file, without overwriting the contents of that file.

e.g.
ping www.boltblue.com >d:\ping.txt send the desired output to a text file.
However, running the same command again overwrites the text file, and I would like to be able to append the next output onto the end of ping.txt, possibly even with the time & date stamped before it?

Could anyone tell me if this is possible, and if so, how?

Thanks, :)

Dopefiend
 

imported_Phil

Diamond Member
Feb 10, 2001
9,837
0
0
Ah, excellent, thanks :)

One more thing- do you know how to stamp the date & time before piping the ping output?

Dopefiend
 

Panther505

Senior member
Oct 5, 2000
560
0
0
date /T >>pingtrpart.doc
time /T >>pingtrpart.doc

echo
ipconfig /all >> pingtrpart.doc

ping 24.216.175.1 >>pingtrpart.doc
echo
ping 24.216.175.1 >>pingtrpart.doc



ping 24.216.26.9 >>pingtrpart.doc
echo
ping 24.216.26.9 >>pingtrpart.doc





ping yahoo.com >>pingtrpart.doc
echo
tracert -h 8 -w 10000 yahoo.com >>pingtrpart.doc



ping cnn.com >>pingtrpart.doc
echo
tracert -h 8 -w 10000 cnn.com >>pingtrpart.doc


ping abcnews.com >>pingtrpart.doc
echo
tracert -h 8 -w 10000 abcnews.com >>pingtrpart.doc


The above will output date, time and then the pings & traceroutes the various websites. My suggestion it to ensure that ping and tracert will respond for each site that way if you get no response you know that you "should" of at least had a response... (ie CNN will not come up on a traceroute) Any questions let me know.
 

imported_Phil

Diamond Member
Feb 10, 2001
9,837
0
0
Wow, that's great, thanks! :)

I'm going to have to look into how to implement this, not really from a Windows point of view, but I download a *lot* from Kazaa (Lite, w00t) and therefore my pings etc will suffer badly when the connection is maxed-out.

What I want to do is to record the results on the hour every hour for say a week to get a good pattern of data, but this means that I'll have to be at the computer most of the time (almost impossible) and pause Kazaa when I want to take readings. Hmm...

(I suppose I could stop downloading for a week or so, but that's gonna get boring real quick :) )

Dopefiend