Telnet batch

Discussion in 'Microsoft Windows 2000 CMD Promt' started by Martin Simmons, Jan 21, 2004.

  1. Lectori Salutum,


    I have a batchfile running that checks my internet
    connectivity 4 times a day. If there is no connectivity,
    it checks the DNS-servers, etc. The FINAL command is to
    teboot the server. But I want the command before the last
    to be a reboot of my (A)DSL modem (router).

    This can be done be telnetting to the device and give it
    the commands: SYSTEM and then REBOOT. But this has to be
    done automated (via a batch-file).

    With FTP you can give commands batch-orientated by
    typing: FTP HOSTNAME -S:FILE.EXT
    The same I want to do with telnet, only telnet does not
    know a parameter like that.

    Does anyone know how to do this???


    RGRDS,
    Martin Simmons
     
    Martin Simmons, Jan 21, 2004
    #1
    1. Advertisements

  2. On Tue, 20 Jan 2004 16:59:04 -0800, "Martin Simmons"
    <> wrote in
    microsoft.public.win2000.cmdprompt.admin:

    >Lectori Salutum,
    >
    >
    >I have a batchfile running that checks my internet
    >connectivity 4 times a day. If there is no connectivity,
    >it checks the DNS-servers, etc. The FINAL command is to
    >teboot the server. But I want the command before the last
    >to be a reboot of my (A)DSL modem (router).
    >
    >This can be done be telnetting to the device and give it
    >the commands: SYSTEM and then REBOOT. But this has to be
    >done automated (via a batch-file).
    >
    >With FTP you can give commands batch-orientated by
    >typing: FTP HOSTNAME -S:FILE.EXT
    >The same I want to do with telnet, only telnet does not
    >know a parameter like that.
    >
    >Does anyone know how to do this???


    Here's what I wrote earlier on the subject:
    (Quoted from
    <http://groups.google.com/groups?hl=en&selm=k49hjv4v3bk99g03hvftucqhql795e1rr3%404ax.com>

    I don't think there is a way of scripting the standard Microsoft
    telnet client (although some people in the past have come up with some
    VB scripts which issued SendKeys commands - ugly).

    I suggest you use a comms program, and among those I would use Kermit.
    See : http://www.columbia.edu/kermit/ckermit.html and
    http://www.columbia.edu/kermit/ckscripts.html
    Unfortunately, the Win32 version (Kermit95) is not free; you'll
    probably find others which are, but I can't comment on those.

    --
    Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
     
    Michael Bednarek, Jan 21, 2004
    #2
    1. Advertisements

  3. Martin Simmons

    Don Guest

    Martin,

    This is not an advertisement, but I use a product called
    ZOC. This is a great telnet utility and allows you to
    write scripts (including Rexx-like commands) to do
    whatever you'd like in a batch file.

    I use ZOC to telnet to our load balancers when an error is
    detected to change their settings. I have found it
    powerful and useful.

    -- Don


    >-----Original Message-----
    >Lectori Salutum,
    >
    >
    >I have a batchfile running that checks my internet
    >connectivity 4 times a day. If there is no connectivity,
    >it checks the DNS-servers, etc. The FINAL command is to
    >teboot the server. But I want the command before the last
    >to be a reboot of my (A)DSL modem (router).
    >
    >This can be done be telnetting to the device and give it
    >the commands: SYSTEM and then REBOOT. But this has to be
    >done automated (via a batch-file).
    >
    >With FTP you can give commands batch-orientated by
    >typing: FTP HOSTNAME -S:FILE.EXT
    >The same I want to do with telnet, only telnet does not
    >know a parameter like that.
    >
    >Does anyone know how to do this???
    >
    >
    >RGRDS,
    >Martin Simmons
    >
    >.
    >
     
    Don, Jan 21, 2004
    #3
  4. Martin Simmons

    nut cracker Guest

    Hrmmm, Interesting. I might look into that myself.

    I prefer PERL for such things, though.

    NuTs

    "Don" <> wrote in message
    news:138f01c3e01f$b1a1ba00$...
    > Martin,
    >
    > This is not an advertisement, but I use a product called
    > ZOC. This is a great telnet utility and allows you to
    > write scripts (including Rexx-like commands) to do
    > whatever you'd like in a batch file.
    >
    > I use ZOC to telnet to our load balancers when an error is
    > detected to change their settings. I have found it
    > powerful and useful.
    >
    > -- Don
    >
    >
    > >-----Original Message-----
    > >Lectori Salutum,
    > >
    > >
    > >I have a batchfile running that checks my internet
    > >connectivity 4 times a day. If there is no connectivity,
    > >it checks the DNS-servers, etc. The FINAL command is to
    > >teboot the server. But I want the command before the last
    > >to be a reboot of my (A)DSL modem (router).
    > >
    > >This can be done be telnetting to the device and give it
    > >the commands: SYSTEM and then REBOOT. But this has to be
    > >done automated (via a batch-file).
    > >
    > >With FTP you can give commands batch-orientated by
    > >typing: FTP HOSTNAME -S:FILE.EXT
    > >The same I want to do with telnet, only telnet does not
    > >know a parameter like that.
    > >
    > >Does anyone know how to do this???
    > >
    > >
    > >RGRDS,
    > >Martin Simmons
    > >
    > >.
    > >
     
    nut cracker, Feb 2, 2004
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fresh Kist

    Path Statement Not Working... Ping and Telnet and Tracert Missing

    Fresh Kist, Aug 19, 2003, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    4
    Views:
    1,034
    Herb Martin
    Aug 20, 2003
  2. Jeromy113

    Running msinfo32 remotely from telnet

    Jeromy113, Aug 20, 2003, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    6
    Views:
    4,843
    Ritchie
    Aug 21, 2003
  3. ice

    can i open telnet for user group?

    ice, Oct 1, 2003, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    4
    Views:
    204
  4. Jaime Richmond

    batch commands in side telnet session

    Jaime Richmond, Aug 27, 2004, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    1
    Views:
    769
    Mark R. Blain
    Aug 28, 2004
  5. Vu Ngoc Son

    Telnet Batch!

    Vu Ngoc Son, Jul 5, 2005, in forum: Microsoft Windows 2000 CMD Promt
    Replies:
    4
    Views:
    28,309
    zhitenglin
    Dec 21, 2008
Loading...

Share This Page