Computer Hope

Microsoft => Microsoft DOS => Topic started by: xenomorphuk on December 06, 2008, 08:41:59 PM

Title: batch file to run telnet and type in commands for me?
Post by: xenomorphuk on December 06, 2008, 08:41:59 PM
i want to be able to run the .bat file and have it type out a load of commands in telnet for me.
how can i do this?
thanks
Title: Re: batch file to run telnet and type in commands for me?
Post by: Jacob on December 07, 2008, 01:39:52 AM
In command prompt type in telnet /?
Title: Re: batch file to run telnet and type in commands for me?
Post by: xenomorphuk on December 07, 2008, 06:21:49 AM
this just shows me some commands i can use in telnet.
i need to know how to write this in the .bat file so that when i click on it, it will conduct it for me

i start with c:\windows\system32\telnet.exe
is this right?

basically i want to be able to click on my .bat file and have it use telnet to send an email.
using the commands in telnet:
open smtp.dsl.pipex.com 25

mail from:<[email protected]>

rcpt to:<[email protected]>

you get me?

thanks
Title: Re: batch file to run telnet and type in commands for me?
Post by: Jacob on December 07, 2008, 07:04:24 AM
Code: [Select]
@echo off
telnet command
pause >nul
And so on...
Title: Re: batch file to run telnet and type in commands for me?
Post by: xenomorphuk on December 07, 2008, 07:24:15 AM
sorry but i am confused
i am an absolute beginner in using cmd's

should it look like this? because it doenst appear to work

c:\windows\system32\telnet.exe
@echo off
telnet open smtp.dsl.pipex.com
mail to:<[email protected]>
pause >nul
Title: Re: batch file to run telnet and type in commands for me?
Post by: Jacob on December 07, 2008, 08:22:01 AM
There is no need for the c:\windows\system32\telnet.exe
As for telnet commands, you will need someone elses help.