| 1. |
Solve : Batch file to run Telnet command that looks up a list? |
|
Answer» hi there. . I need some help automating a script. i want the batch file to look up that room number on a list and match it to an ip then telnet to it. im assuming comma delimited format exported from excel. so it would be like If Excel quotes each of the fields in the comma SEPARATED file, the code can modified to take that into account. The snippet below uses the above file labeled room.csv Code: [Select]echo off set /p rm=Enter Room Number: for /f "tokens=1-2 delims=," %%i in (room.csv) do ( if %rm%==%%i telnet %%j ) If needed the code can be modified to LOOP should the user enter an incorrect room number. Good luck. |
|