1. @echo off 
  2. for /f "skip=1 tokens=*" %%a in ('wmic nteventlog get filename') do call :pp %%a  
  3. goto :eof  
  4. :pp  
  5. wmic nteventlog where filename="%1" call cleareventlog  
  6. goto :eof  

wmic nteventlog get filename 的结果为:

清除系统日志_日志