New
#50
Hi Blappy and welcome to the forums.
We're all here to help each other.
Awesome!!
Zardoc,
Thanks for posting this very useful batch file.
Here's my take on the script.
Code:@echo off cls title Eventing Command Line Utility: Cleanup Script goto :question :question echo. echo EMPTY ALL WINDOWS AND PROGRAM EVENT LOGS? echo. set /p ANSWER=(YES/NO): if /i {"%ANSWER%"}=={"y"} (goto :start) if /i {"%ANSWER%"}=={"yes"} (goto :start) if /i {"%ANSWER%"}=={"n"} (goto :cancel) if /i {"%ANSWER%"}=={"no"} (goto :cancel) goto :input_error :input_error cls echo. echo *ERROR: Invalid Option echo _________________________________________ goto :question :start for /f "tokens=*" %%G in ('wevtutil.exe el') do (call :clear "%%G") goto :finish :clear echo Emptying %1 wevtutil.exe cl %1 goto :eof :finish cls echo. wevtutil.exe cl System echo. echo DONE. Press any key to exit. pause>nul goto :end :cancel cls echo. REM USER CANCELED, Quiting Silently... goto :end :end title Command Prompt cls @echo on goto :eof :eof
Last edited by Quad5Ny; 05 Jun 2012 at 17:34. Reason: Changed echo off to echo on
Gentlemen: First of all: Many thanks for this script to clean up win7! As we say here in the Netherlands: It went like a spear. I searched all internet for a script like this, well, it sounds familiar to you I think. I have a question: Our daily computer is win7, but is there also a script to clean up win xp home edition? Because I purchased a beautiful Acer 9800, you know, that 21" laptop that can`t be used on the lap because its weight of about 18 pound , but with a very nice screen for my technical works and drawings. A friend of mine put winxp on it, so that`s why I would like a script to clean it up sometimes. Well, wishing all of you all the best, Gerard, The Netherlands.
That bat file is magical. cleaned all my event logs. I had been searching for days how to clear that custom administrative logs dating back to 2-3 year old entries on my pc. This script did that.
thanks.
--
Rawat
India