Batch Processing directly logs on to the cisco switch and executes commands. In many cases, we may log on to the cisco switch to execute some common viewing commands. However, every time we run cmd, enter the password, and enter the command, it is troublesome. It can be achieved through batch processing. For example, if you log on to the cisco switch 192.168.0.1 and ping another switch 192.168.0.2 www.2cto.com, the script is as follows: @ echo offecho set sh = WScript. createObject ("WScript. shell ")> telnet_tmp.vbsecho WScript. sleep 300> telnet_tmp.vbsecho sh. sendKeys "open 192.168.0.1"> telnet_tmp.vbsecho WScript. sleep 300> telnet_tmp.vbsecho sh. sendKeys "{ENTER}"> telnet_tmp.vbsecho WScript. sleep 300> telnet_tmp.vbsecho sh. sendKeys "root {ENTER }" > Telnet_tmp.vbsecho WScript. sleep 300> telnet_tmp.vbsecho sh. sendKeys "YOUR_PASSWORD {ENTER}"> telnet_tmp.vbsecho sh. sendKeys "ping 192.168.0.2 {ENTER}"> telnet_tmp.vbsstart telnet cscript // nologo telnet_tmp.vbsecho del telnet_tmp.vbs www.2cto.com so that ping results can be immediately displayed. However, sometimes we want users to perform some tests and directly send the execution results to us in text format. This requires redirecting the debugging results to text files.