Author Topic: Testing for Internet Connection  (Read 127 times)

mjwillyone

  • Newbie
  • *
  • Posts: 45
Testing for Internet Connection
« on: September 16, 2021, 04:36:46 am »
Hello All!

I was wondering the simplest way to test for an internet connection?  I have a Winbatch routine that sends emails, but I want to test first to see that the connection is working.

Thanks!
Mike

td

  • Tech Support
  • *****
  • Posts: 3872
    • WinBatch
Re: Testing for Internet Connection
« Reply #1 on: September 16, 2021, 07:18:25 am »
Simple is a subjective term but one way is to attempt to do something in a script that requires an internet connection. For example, you could execute a ping command via any of the methods available to WinBatch scripts.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

  • Pundit
  • *****
  • Posts: 1534
Re: Testing for Internet Connection
« Reply #2 on: September 16, 2021, 10:32:28 am »
Hello All!

I was wondering the simplest way to test for an internet connection?  I have a Winbatch routine that sends emails, but I want to test first to see that the connection is working.

Thanks!
Mike


Makes one think you have inherited scripts from a former user, probably written a while ago,,, and need assistance with mods....best you could place in some code so the fix would be less philosophical.....