Results 1 to 5 of 5

Thread: HELP !! Using DOS commands

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    37

    Question

    i need to run this dos command in a VB application and record the outcome in a Chart the line needs to run until its told to stop, can anyone help please.

    "netstat - e > c:\temp.txt"


    Thanks

  2. #2
    Guest
    Does it really need to run until you tell it to stop? Or, can you invoke it from code until you get the response you want?

    I don't know what netstat -e does, but I do know that you are recreating temp.txt each time it runs. Presumably, you are getting a response that says no action and sooner or later, you get an action response.

    If this is the case you could check the filelength of test.txt after each iteration of "netstat -e > text.txt" for any changes.

    Hope this helps.


    Good Luck
    DerFarm


  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    37
    i can run the command in dos but i dont no how to get a VB application to run DOS then the command

  4. #4
    Guest
    Just my $0.02 :

    Using this:

    Code:
    Dir C:\ >Text.txt
    will overwrite Text.txt, whereas

    Code:
    Dir C:\ >>text.txt
    will append to the file

    Enjoy!

  5. #5
    Guest
    maybe you can try it a console program..

    there is a tutorial on this sight:

    http://www.vb-world.net/articles/console/index.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width