Sevenforums have produced a simple one click batch file to automatically clear all Windows 7 Event Logs. One of my regular PC maintenance tasks is to review these logs for critical problems, errors and warnings. They can sometimes provide an early indication of problems such as a failing hard drive or a poorly written driver – and I’m a little OCD about keeping the logs error free
The most commonly used Windows 7 Logs are Application and System (there are many others) – they can be viewed via the Event Viewer program, part of Computer Management. Having reviewed the logs (and resolved any problems if necessary), I then typically clear each log to avoid seeing the same errors next time – it makes it easier to see the wood from the trees.
To clear one of the logs (e.g. Application log) I can right click the log and choose Clear Log or select this same option from the Action menubar item or from the Actions list in the right hand panel:
However, it really wastes time having to clear each log individually and, for each one, a popup appears asking if I want to save the log contents first – more time wasted as I never do:
Microsoft don’t provide a way to quickly clear all logs at once but a one click batch file (program) can do this job perfectly.
Download – download the batch file from Sevenforums here and unzip (extract) it to the desktop. Right click the unzipped Win7Viewer.bat file and select ‘Run as administrator’ then press Yes to run it.
A Command Prompt window appears and you should see a long scrolling list of all the Windows logs as they are being cleared – when it has finished the program closes the window automatically:
Note: If you run the batch file and it opens a Command Prompt window which just closes again immediately, you forgot to run it as administrator…
This batch file does a great job of clearing all Windows 7 event logs with one click (technically two if you include the right click…) and saves time compared to clearing each log individually. However, it should only be used if you are sure you do not need to keep the log history for future reference – even if you don’t use them, they may be helpful if you have to ask a techie expert for help.
Note that clearing these logs will not normally speed up a PC – it only helps make future examination easier. If in doubt, clear them individually in the normal way and Save each one when prompted so they can be reloaded and reviewed later.