Indigo Rose Software
  #1  
Old 10-14-2004
G Mills G Mills is offline
Indigo Rose Customer
 
Join Date: Oct 2004
Posts: 6
Adding results of Dos commands to a file

Does anyone know how you may be able to store the results of a ping command in a text file?

I have been able to run the ping using the followin code:

Gateway = Dialog.Input("Enter Default Gateway", "What is the Address of your default gateway:", "", MB_ICONQUESTION);
Shell.Execute("ping", "open", Gateway, "", SW_SHOWNORMAL);

My problem is being able to add the ping results to a text file. Any clues?
Reply With Quote
  #2  
Old 10-14-2004
Jason Pate Jason Pate is offline
Forum Member
 
Join Date: Jan 2002
Location: Nashville TN
Posts: 328
Ping 192.168.1.15>ping.txt you can also specify the path to the ping.txt file. The > will redirect the out put for you, this is an OLD dos method but works in XP.


ping x.x.x.x>text file name


Quote:
Shell.Execute("ping", "open", Gateway..">ping.txt", "", SW_SHOWNORMAL);
I did not run it but that should work.
Attached Files
File Type: txt ping.txt (461 Bytes, 22 views)

Last edited by Jason Pate; 10-14-2004 at 10:58 AM.
Reply With Quote
  #3  
Old 03-20-2006
djpyne djpyne is offline
Forum Member
 
Join Date: Oct 2003
Location: New Hope, PA
Posts: 9
I actual was able to make this work with this:

Shell.Execute("CMD", "open", "/C Ping "..Gateway..">ping.txt", "", SW_SHOWNORMAL);
Reply With Quote
  #4  
Old 03-22-2006
Adam's Avatar
Adam Adam is offline
Indigo Rose Staff Member
 
Join Date: May 2000
Location: Indigo Rose Software
Posts: 2,154
This is very interesting to know. Thanks

Adam Kapilik
Reply With Quote
  #5  
Old 03-22-2006
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
To append to the file, use >>
Reply With Quote
  #6  
Old 03-22-2006
TJS's Avatar
TJS TJS is offline
Indigo Rose Customer
 
Join Date: Oct 2005
Location: MI
Posts: 522
No kidding! I swear some of these tips are worth tatooing on my arm!

Code:
      _   _
I    /  V  \    \  \
I   |       |     \  \
I    \     /      /  /
I      \ /      /  /
__________________
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

()))))))))o)))))))==============================================
Reply With Quote
  #7  
Old 03-22-2006
Adam's Avatar
Adam Adam is offline
Indigo Rose Staff Member
 
Join Date: May 2000
Location: Indigo Rose Software
Posts: 2,154
The ASCII is strong in this one..
Reply With Quote
  #8  
Old 03-22-2006
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
Here's a post on Pinging from AMS too. I wrote a DLL that does it, and Corey took aother angle

http://www.indigorose.com/forums/sho...light=ping+dll
Reply With Quote
  #9  
Old 03-22-2006
Intrigued's Avatar
Intrigued Intrigued is offline
Indigo Rose Customer
 
Join Date: Dec 2003
Location: Location! Location!
Posts: 6,058
How can you all talk about Ping when Pong has so much potential as well?!

(snort laught)
__________________
Intrigued
www.amsuser.com
Reply With Quote
  #10  
Old 03-22-2006
TJS's Avatar
TJS TJS is offline
Indigo Rose Customer
 
Join Date: Oct 2005
Location: MI
Posts: 522
true story...

...I almost named my dog traceroute...
__________________
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

()))))))))o)))))))==============================================
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Audio Tracks Project Michael AutoPlay Media Studio 5.0 7 03-18-2004 11:58 PM
HOWTO: Create a Project Template Support AutoPlay Media Studio 4.0 Examples 0 10-28-2002 02:49 PM
HOWTO: "Hide" Externally Referenced Files Support AutoPlay Media Studio 4.0 Examples 0 10-23-2002 04:19 PM
Can search allow manual browse even if file is found? RichardShaw Setup Factory 5.0 2 08-28-2000 07:08 PM
Install only into one of several directories with specific existing file? RichardShaw Setup Factory 5.0 0 08-17-2000 03:29 PM


All times are GMT -6. The time now is 08:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software