#!C:\Perl\bin\perl use warnings; use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>40, Dump_log=>'dump.log', Input_log=>'input.log', Output_log=>'output.log', Errmode=>'die'); $telnet->open('x.x.x.x'); $telnet->waitfor('/login/'); $telnet->print("vtat"); print "Login Entered\n"; $telnet->waitfor('/password:/'); $telnet->print("vtat"); print "Password Entered\n"; $telnet->waitfor('/.*\\n/'); $telnet->cmd("cd c:\\Documents and Settings\\vtat\\SCRIPTS\\SCL"); $telnet->waitfor('/.*\\n/'); print $telnet->cmd("Batchfile1.bat"); $telnet->waitfor('/complete/'); print $telnet->cmd("Batchfile2.bat $telnet->close; #### Welcome to Microsoft Telnet Service login: vtat password: *=============================================================== Welcome to Microsoft Telnet Server. *=============================================================== C:\Documents and Settings\vtat>cd c:\Documents and Settings\vtat\SCRIPTS\SCL C:\Documents and Settings\vtat\SCRIPTS\SCL>