Clear Event Log with batch file!!!

C

christian

Does anyone have a batch file to clear the event log? I
know there's one in Visual Basic, but can this be done in
dos? I already made a script to format, rename, and copy
files to a central location, but would like to clear the
log after this occurs on a weekly/daily basis? Any
ideas??? Thanks.
 
G

Guest

----- christian wrote: -----

Does anyone have a batch file to clear the event log? I
know there's one in Visual Basic, but can this be done in
dos? I already made a script to format, rename, and copy
files to a central location, but would like to clear the
log after this occurs on a weekly/daily basis? Any
ideas??? Thanks.

I use eventsave.exe. works well for more than 6 months now and no problem. You can find and download it by searching for eventsave in Yahoo
 
M

Mark V

In said:
Does anyone have a batch file to clear the event log? I
know there's one in Visual Basic, but can this be done in
dos? I already made a script to format, rename, and copy
files to a central location, but would like to clear the
log after this occurs on a weekly/daily basis? Any
ideas??? Thanks.

Not batch-only but:

PsLogList v2.31 - local and remote event log viewer
Copyright (C) 2000-2003 Mark Russinovich
Sysinternals - www.sysinternals.com

PsLogList dumps event logs on a local or remote NT system.

Usage: psloglist [\\RemoteComputer [-u Username [-p Password]]]
[-s [-t delimiter]] [-n # | -d #][-c][-x][-r][-a mm/dd/yy][-b
mm/dd/yy]
[-f filter] [-i ID] [-o event source] [-l event log file] <event log>
-a Dump records timestamped after specified date.
-b Dump records timestamped before specified date.
-c Clear event log after displaying.
-d Only display records from previous n days.
-f Filter event types, using starting letter
(e.g. "-f we" to filter warnings and errors).
-i Show only events with the specified ID.
-l Dump the contents of the specified saved event log
file.
-n Only display n most recent records.
-o Show only records from the specified event source
(e.g. "-o cdrom").
-p Specifies password for user name.
-r Dump log from least recent to most recent.
-s Records are listed on one line each with delimited
fields, which is convenient for string searches.
-t The default delimiter for the -s option is a comma,
but can be overriden with the specified character.
-u Specifies optional user name for login to
remote computer.
-x Dump extended data.
eventlog Specifies event log to dump. Default is system. If the
-l switch is present then the event log name specifies
how to interpret the event log file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top