If you want to clear the windows log file in your windows 7,8 or Vista then use this batch script to clear it.
Copy and paste this script in a notepad and save it with an extension .bat. And then run that file “As administrator”.
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
/bu:
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl Application /bu:C:EventViewerBackupsApplicationbackup.evtx %1
goto :eof
:noAdmin
exit
Want to clean out your Event Viewer logs ?
Here is the script:
Code: [Select]
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:noAdmin
exit
Open Notepad and copy/paste the above script into it and save it as a *.bat file extension. When you want to run it, right click on the *.bat file and select Run as administrator. That’s it, the event viewer logs are now empty.
If you want to clear the windows log file in your windows 7,8 or Vista then use this batch script to clear it.
Copy and paste this script in a notepad and save it with an extension .bat. And then run that file “As administrator”.
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
/bu:
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl Application /bu:C:EventViewerBackupsApplicationbackup.evtx %1
goto :eof
:noAdmin
exit
Want to clean out your Event Viewer logs ?
Here is the script:
Code: [Select]
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:noAdmin
exit
Open Notepad and copy/paste the above script into it and save it as a *.bat file extension. When you want to run it, right click on the *.bat file and select Run as administrator. That’s it, the event viewer logs are now empty.
If you want to clear the windows log file in your windows 7,8 or Vista then use this batch script to clear it.
Copy and paste this script in a notepad and save it with an extension .bat. And then run that file “As administrator”.
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
/bu:
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl Application /bu:C:EventViewerBackupsApplicationbackup.evtx %1
goto :eof
:noAdmin
exit
Want to clean out your Event Viewer logs ?
Here is the script:
Code: [Select]
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:noAdmin
exit
Open Notepad and copy/paste the above script into it and save it as a *.bat file extension. When you want to run it, right click on the *.bat file and select Run as administrator. That’s it, the event viewer logs are now empty.
eAnswers Team
If you want to clear the windows log file in your windows 7,8 or Vista then use this batch script to clear it.
Copy and paste this script in a notepad and save it with an extension .bat. And then run that file “As administrator”.
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
/bu:
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl Application /bu:C:EventViewerBackupsApplicationbackup.evtx %1
goto :eof
:noAdmin
exit
Dianaeric
Want to clean out your Event Viewer logs ?
Here is the script:
Code: [Select]
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:noAdmin
exit
Open Notepad and copy/paste the above script into it and save it as a *.bat file extension. When you want to run it, right click on the *.bat file and select Run as administrator. That’s it, the event viewer logs are now empty.
eAnswers Team
If you want to clear the windows log file in your windows 7,8 or Vista then use this batch script to clear it.
Copy and paste this script in a notepad and save it with an extension .bat. And then run that file “As administrator”.
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
/bu:
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl Application /bu:C:EventViewerBackupsApplicationbackup.evtx %1
goto :eof
:noAdmin
exit
Dianaeric
Want to clean out your Event Viewer logs ?
Here is the script:
Code: [Select]
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:noAdmin
exit
Open Notepad and copy/paste the above script into it and save it as a *.bat file extension. When you want to run it, right click on the *.bat file and select Run as administrator. That’s it, the event viewer logs are now empty.
eAnswers Team
If you want to clear the windows log file in your windows 7,8 or Vista then use this batch script to clear it.
Copy and paste this script in a notepad and save it with an extension .bat. And then run that file “As administrator”.
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
/bu:
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl Application /bu:C:EventViewerBackupsApplicationbackup.evtx %1
goto :eof
:noAdmin
exit
Dianaeric
Want to clean out your Event Viewer logs ?
Here is the script:
Code: [Select]
@echo off
FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F “tokens=*” %%G in (‘wevtutil.exe el’) DO (call :do_clear “%%G”)
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
goto :eof
:noAdmin
exit
Open Notepad and copy/paste the above script into it and save it as a *.bat file extension. When you want to run it, right click on the *.bat file and select Run as administrator. That’s it, the event viewer logs are now empty.