Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WwIPStuff
Message
 
To
10/02/2001 15:45:17
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00474749
Message ID:
00474761
Views:
15
>I've got a really cheezy way to do it:
>
>Use Ed Rauh's API_APPRUN to run the DOS PING without a window. Direct the result to a text file. Use FILETOSTR to parse the text file. If "Unknown host" is in the text file, then the site does not exist.
>

Hi again John,

Sorry to latch onto you about this!

The code below works fine:
--------------------------
oProcess1=CREATEOBJ('API_AppRun','ping www.site.com','C:\','NOR')
oProcess1.LaunchAppandWait()


BUT


this code says bad parameter passed (note the redirect to test.txt)
-------------------------------------------------------
oProcess1=CREATEOBJ('API_AppRun','ping www.site.com >test.txt','C:\','NOR')
oProcess1.LaunchAppandWait()

I can issue this from a command prompt:
---------------------------------------
PING www.site.com >test.txt

and the result of the ping is redirected to the text file TEST.TXT



So I'm assuming I'm missing something here. I like the idea you suggested alot, and of course I won't actually be pinging www.site.com (just shorter to type in here) Also, I'll be running the ping window hidden. However, I can't seem to get the syntax to work (passing a redirect and filename.)

Any ideas? (Ed, are you around today?)

Thanks again,
Previous
Reply
Map
View

Click here to load this message in the networking platform