eventcreate with multiline description
Posted
by Adam J.R. Erickson
on Server Fault
See other posts from Server Fault
or by Adam J.R. Erickson
Published on 2010-04-30T18:33:13Z
Indexed on
2010/04/30
18:38 UTC
Read the original article
Hit count: 1147
batch-file
|eventcreate
I'd like to use eventcreate from a batch file to log the results of a file copy job (robocopy). What I'd really like to do is use the output of the file copy job as the description of the event (/D of createevent). The trouble is, there are multiple lines in the file copy output, and I've only been able to get one line into a local variable or a pipe command.
I've tried reading a local variable in from file, like
set /P myVar=<temp.txt
but it only gets the first line.
How can I write multiple lines to the description of an event from a batch file?
© Server Fault or respective owner