SSH? how to use?
Main Topics
Browse All TopicsHow to write a telnet script and ask Windows' DOS to execute?
I want the script to do the following.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
It looks like you are connecting to another computer and copying files from one directory to another. I would have to look into how to use SSH to do this.
I've found the problem with the file not running correctly. Instead of making a .bat file it should be a .vbs file. .bat files work for most things but because telnet requires user intervention (i.e. you must type things in and then hit enter to send the command) you must use a .vbs script in order for it to work correctly.
set WshShell = WScript.CreateObject("WScr
WshShell.Run "cmd"
WScript.Sleep 100
WshShell.AppActivate "C:\Windows\system32\cmd.e
WScript.Sleep 100
WshShell.SendKeys "telnet 10.33.000.000{ENTER}"
WScript.Sleep 100
WshShell.SendKeys "abc{ENTER}" 'Username
WshShell.SendKeys "abc{ENTER}" 'Password
WScript.Sleep 100
WshShell.SendKeys "cd /app/mfgpro/data/trng/intf
WScript.Sleep 100
WshShell.SendKeys "cp -p *.* /app/mfgpro/data/trng/intf
WScript.Sleep 200
WshShell.SendKeys "exit{ENTER}" 'close telnet session'
WScript.Sleep 200
WshShell.SendKeys "{ENTER}" 'get command prompt back
WScript.Sleep 200
WshShell.SendKeys "exit{ENTER}" 'close cmd.exe
If you will copy the above code into notepad and save it as a .vbs file it should run correctly. Remember to make changes to the username and password as needed.
Business Accounts
Answer for Membership
by: patrickrwPosted on 2008-11-19 at 18:18:30ID: 23000764
You should be able to do this. You will have to put the instructions you want run into a batch file and use a scheduled task to make it run on specified days at specified times. Just save the commands you want run just like you have it now into notepad and then save it as a .bat file. I would save it to C: so its easy to find. Then in your scheduled tasks just make it scheduled to run that .bat file at a certain day/time. Should be all there is to it.
*Note: Telnet is bad security wise. Might want to look at using SSH if at all possible.