Telnet in .bat file?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jsarver
Posts: 1
Joined: 04 May 2018 08:32

Telnet in .bat file?

#1 Post by jsarver » 04 May 2018 08:39

Hey guys,

I'm new to all of this and am trying to make some tasks at work a little easier for me and my coworkers.

I have a .bat file i created to program a TCP/IP card in a Tank monitor, I am able to get all of the functions operational up until i get to the telnet portion.

I also have another .bat file for work to pull some logs from a Tank monitor as well. I'm encountering similiar issues once i get to the Telnet portion of it.

I'll add what i've got and hopefully someone could help me out and get these working! I'm not sure what i'm doing wrong or if this is even possible.

Thanks in advance!

TCP/IP Programming
"@echo off
title VeederRoot TCPIP Setup
echo Dont forget to change your desired IP in the .bat file and your computers IP etc.!
pause
ARP -S 10.5.48.3 (MAC Address)
pause
ARP -A
echo Ensure IP was added to the ARP table!
pause
telnet 10.5.48.3 1
echo CMD should inform you it's unreachable!
pause
telnet 10.5.48.3 9999
pause
0
pause
y
pause
010.005.048.003
y
010.005.048.001
8
N
9
pause
echo Make sure you are able to pull an inventory report!
pause
telnet 10.5.48.3 10001
pause
^A 200
pause"

Log Retrieval
"@echo off
title VR Tank Testing Log Retrievel
echo Don't forget to change your IP in the .bat file!
pause
telnet 10.5.48.3 10001
^A 200
pause
^A IA5100
pause
^A IA5200
pause
^A IA5300
pause
^A IA5400
pause
^A I10100
pause
^A I10200
pause
^A I11100
pause
^A I11200
pause
^A I20100
pause
^A I20200
pause
^A I20600
pause
^A I25100
pause
^A I60900
pause
^A I61200
pause
^A I61400
pause"

Squashman
Expert
Posts: 4471
Joined: 23 Dec 2011 13:59

Re: Telnet in .bat file?

#2 Post by Squashman » 04 May 2018 08:52

The Windows Telnet client is not scriptable. You will need to use a 3rd party telnet client to do that.
http://support.moonpoint.com/downloads/ ... /tst10.php

Post Reply