You can append to a file by using double greater than signs: >>
rem This will overwrite the file each time:
echo Overwrite this line > log.txt
echo Starting Test > log.txt
rem This will append to the end of the file:
echo Passed Test 1 >> log.txt
echo Failed Test 2 >> log.txt
type log.txt
rem Starting Test
rem Passed Test 1
rem Failed Test 2
On Tue, Feb 17, 2009 at 9:12 AM, John Black
<
spam@...> wrote:
>
> I would like to write Error messages to eventlog if something does not
> work as expected with my backup batch file.
>
> How can I do this? Is there a windows command which allows me to add
> entries to eventlog from the command line?
>
> Thanks
> John
>