Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: telnet from a batch file  (Read 4019 times)

0 Members and 1 Guest are viewing this topic.

ann wincent

  • Guest
telnet from a batch file
« on: November 22, 2004, 11:56:34 AM »
I was able to set up a batch file to open a telnet session, but I still have to type in my username and password for the session to actually start. Is there any way to set up the batch file to automatically enter my username and password?

any ideas or solutions are welcome.

Thanks.

yeah_right

  • Guest
Re: telnet from a batch file
« Reply #1 on: November 24, 2004, 01:33:51 PM »
you can solve this problem by writing a seperate script(not  a batch file) i.e a simple text file which contains your username/pwd and any other automated steps and referencing this script from your batch file.

here is  an example i used to FTP files to another server

ftps -c:600 -t:600 -s:PutNewFiles.txt
del *.txt
del *.blk
del *.mpg


In the above example, "PutNewFiles.txt" is a txt file that  has the following information

open 192.168.2.xxx
username
password
bin
ls
mput st*.zip

when the batch file is run and the ftp starts, since the batch file gives control to the ftp program, the script is used to carry out ftp functions and control is passed back to the batch file once the ftp  is complete

« Last Edit: November 24, 2004, 01:37:46 PM by yeah_right »