PC Review


Reply
Thread Tools Rate Thread

Telnet batch

 
 
Martin Simmons
Guest
Posts: n/a
 
      21st Jan 2004
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

 
Reply With Quote
 
 
 
 
Michael Bednarek
Guest
Posts: n/a
 
      21st Jan 2004
On Tue, 20 Jan 2004 16:59:04 -0800, "Martin Simmons"
<(E-Mail Removed)> 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"
 
Reply With Quote
 
 
 
 
Don
Guest
Posts: n/a
 
      21st Jan 2004
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
>
>.
>

 
Reply With Quote
 
nut cracker
Guest
Posts: n/a
 
      2nd Feb 2004
Hrmmm, Interesting. I might look into that myself.

I prefer PERL for such things, though.

NuTs

"Don" <(E-Mail Removed)> wrote in message
news:138f01c3e01f$b1a1ba00$(E-Mail Removed)...
> 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
> >
> >.
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated/scripted Telnet Session using built-in windows telnet. =?Utf-8?B?amVyZW15Yg==?= Windows XP General 2 27th Aug 2006 11:58 PM
batch commands in side telnet session Jaime Richmond Microsoft Windows 2000 CMD Promt 1 28th Aug 2004 12:17 AM
How do you I telnet from .NETCF application to desktop telnet server? =?Utf-8?B?SmFjaw==?= Microsoft Dot NET Compact Framework 2 26th May 2004 03:06 PM
Re: batch files and telnet Torgeir Bakken (MVP) Windows XP General 0 14th Nov 2003 11:51 PM
batch files with telnet danny buck Windows XP Basics 0 14th Nov 2003 06:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:29 AM.