CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 1999
    Posts
    21

    Ping using shell

    I wrote an application to ping a machine using shell command and redirect the output to a file which was working fine till morning and suddenly it stopped working . I tried everytihing to debug it but the command does not write to the file.

    My code

    Pingit.BAT

    Ping %1>%2

    and the command

    Shell "c:\sendmail\Pingit.BAT" & address & "c:\sendmail\shellping.txt"

    Thanks!



  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Ping using shell

    I tried your code and everything worked fine.
    All I can see are a few missing blanks in your shell command.
    Shell "...bat " & address & " c:\yourfile.txt"
    watch the blank after "BAT" and before "C:\..."


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

Featured