Click to See Complete Forum and Search --> : Shell


Garry
November 4th, 1999, 02:08 PM
How do I use the shell command in VB to ping a computer and redirect the output to a file on my C drive?


Thanks!

Aaron Young
November 4th, 1999, 03:01 PM
The easiest way would be to create a Batch File and call that from the Shell Command in VB, eg.

In a "PingIt.bat" Batch File..
PING %1 > %2

In VB..
Shell "C:\PingIt.bat www.codeguru.com C:\PingFile.txt"


Aaron Young
Analyst Programmer
adyoung@win.bright.net
aarony@redwingsoftware.com