net send batch file new line

  • Thread starter Thread starter SrA Michael Roszkowski USAF
  • Start date Start date
S

SrA Michael Roszkowski USAF

I know you can type "CTRL+T" to get a new line in the net
send command when you're typing it from the command line.

Does anyone know how to do the same thing from a batch
file?

Here's my batch:
:: start (notify.bat)

setlocal
set msg=Node %1 down! Check OpenView immediately!
FOR /F %%i IN (notifylist.txt) DO @net send %%i %msg% > Nul
endlocal

:: end


Notifylist.txt is a text file with the single line of the
computer name that I want notified. Obviously this list
will grow to reflect all the computers that will be
notified.

The IP address is passed from the command line.

Thanks,
SrA Michael Roszkowski USAF
<[email protected]>
(Change the U to an i)
 
That did it... I didn't have a % in-front of the ¶
charecter.

Thank you!
 
Back
Top