I am NOT a DOS programmer - but I need some help writing this simple utility. I want the batch to read
a file (icu.txt) and pass two parameters to a command (%%i"ip" and %%j"location")- here is what I have so far - everything works except it doesn't pass the IP address to the executable - it just shows up as "%i" - I appreciate any help you can give.
setlocal EnableDelayedExpansion
FOR /F "tokens=1,2 delims=," %%i IN (icu.txt) do call :hello
:hello
d:\scheduled\icu_hello\send_message_to_ip.exe %%i 3046 HELLO
if %ERRORLEVEL% neq 0 (c:\g\glh\blat d:\scheduled\icu_hello\message.txt -to
[email protected] -subject "PROBLEM WITH %%j" -attach -q -priority 1 -mailfrom
[email protected] -replyto
[email protected] -noh2 -r -d) else (ECHO Site Resonding:%ERRORLEVEL%